Anonymous
Anonymous

Reputation: 9658

Jenkins hangs when fetching code from Git

I setup a new Jenkins job to fetch source code from a local Git. I can fetch from the server using git clone on cmd. When I fetch source code using Jenkins job it hangs with the following message for 10 minutes before throws time-out error

Building remotely on Windows 2001 in workspace D:\ASDF555\Jenkins\workspace\TEST_JOB Fetching changes from the remote Git repository Fetching upstream changes from [email protected]:team888/product555.git

I also configure path to use git.exe under cmd directory. How can I fix this problem?

Upvotes: 4

Views: 4875

Answers (3)

Derek Lawrence
Derek Lawrence

Reputation: 1588

Make sure your workspace is empty. I had this happen intermittently and then noticed it was only happening in one workspace. I ssh'ed into the jenkins server and manually deleted everything in the workspace.

Git no longer hangs.

Upvotes: 2

How long time does it usually take to make the clone from execute windows shell ?

I had a similar problem and i had to start jenkins with this option on windows. Find the jenkins.xml file and edit the line with arguments for java. you have to set the git timeout value to something higher than you have now.

<executable>java</executable>
<arguments>-Dorg.jenkinsci.plugins.gitclient.Git.timeOut=400 </arguments>

Save the file and restart jenkins

Upvotes: 0

Mayur Nagekar
Mayur Nagekar

Reputation: 821

Login into the jenkins servers as "jenkins" user if you aren't already and clone from the cmd. Check if it's successful? If it is, then try to run the job from GUI.

Upvotes: 0

Related Questions