Jenkins stuck on “Retrieving Git references…”

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…”.

git_stuck

No amount of building (as the help suggests) or refreshing the page would populate the field.

We’re using:

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s