All authenticated Git operations from Master node fail

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

All authenticated Git operations from Master node fail

Ben Coo
When attempting to perform an authenticated Git operation from our Master node through Jenkins, it will always fail with the following error:


hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe ls-remote -h <address-to-repo>.git" returned status code 128:
stdout
:
stderr
: 0 [main] ssh 8928 C:\Program Files\Git\usr\bin\ssh.exe: *** fatal error - add_item ("??\C:\Program Files\Git", "/", ...) failed, errno 1
Stack trace:
Frame Function Args
000FFFF9B90 0018005CE9E (0018023D522, 0018021AC39, 00600010000, 000FFFF8B10)
000FFFF9B90 00180046559 (000FFFFABC0, 000FFFF9B90, 1D2FF07C4E9D602, 00000000000)
000FFFF9B90 00180046592 (000FFFF9B90, 00000000001, 00600010000, 505C3A435C3F3F5C)
000FFFF9B90 001800CADBB (00000000000, 00140000024, 00000000000, 1D2FF07CDDAC80D)
000FFFFCBE0 00180118755 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFCCB0 00180046B65 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 001800457C3 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180045874 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
fatal
: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.


This applies to both SSH and HTTP authentication. Performing the exact same operations directly on the server and/or using JGit works as expected. We had originally been using JGit for operations performed on the master node (Polling, SCM checkout of Pipelines, etc) as a workaround, but applying Git Polling from within a Pipeline script (Jenkinsfile) appears to override the JGit specification and use the CLI Git instead, resulting in polling always failing due to the error above.


I get the same result whether I define the Global Tool as "git" or if I give the full path "C:\Program Files\Git\bin\git.exe". The location of ssh.exe is defined as the GIT_SSH env variable. I did this based on a StackOverflow answer to hopefully get somewhere based on the direct error that Git was reporting through the plugin.

I have also done a fresh uninstall-reinstall of Git for Windows (multiple times) with no change.

Environment:
  • Windows Server 2012
  • Jenkins 2.60 LTS
  • Latest version of git-plugin and git-client-plugin (3.3.2 & 2.4.6)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e38358dd-2bb7-47f7-a64b-f95b86cc1ef5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...