When using the Git Parameter Plugin to allow the user to choose a branch to build in our Jenkins build job, occasionally we’d find that the git parameter would get stuck on “Retrieving Git references…”.
No amount of building (as the help suggests) or refreshing the page would populate the field.
- Windows 7 64 bit (for both the master and the node)
- Jenkins 2.1 but this also happened on 1.656 and before
- git client plugin 1.19.6
- Git Parameter Plugin 0.51
- Git plugin 2.4.4
- Git server plugin 1.6
After scouring the interwebs, I turned up nothing but reading the Jenkins logs indicated that it may be getting stuck on something around the credential part of the git process.
stderr: at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) ...
So I rdp’d to the Jenkins node and opened up Windows task manager to see what I could see.
There appeared to be 2 processes running called “git-crendential-manager.exe”. Maybe there was some contention between the 2 I thought and so I decided to kill them both and all other git related processes (git.exe, sh.exe).
I then ran build on the job again and, sure enough, the branches populated and I was able to choose the branch to get and build.
Since then I’ve encountered this again and I’m convinced there is an issue with the “git-crendential-manager.exe” process and killing that process alone seems to resolve it.
While I understand this is not a brilliant solution, it does, none the less, work.