Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins time-out while fetching from Github in 10 mins.

Tags:

I've stuck with this issue while configuring Jenkins for Nightly build. Please note that the repository project "project1" is large and is about 900MB. Please let me know how should I go around this problem.

Started by user anonymous Building in workspace C:\Users\user1\.jenkins\jobs\Nightly Build\workspace Fetching changes from the remote Git repository Fetching upstream changes from [email protected]:MyOrg/projectgroup/project1 ERROR: Timeout after 10 minutes FATAL: Failed to fetch from [email protected]:MyOrg/projectgroup/project1 hudson.plugins.git.GitException: Failed to fetch from [email protected]:MyOrg/projectgroup/project1     at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)     at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)     at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)     at hudson.model.AbstractProject.checkout(AbstractProject.java:1412)     at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)     at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)     at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)     at hudson.model.Run.execute(Run.java:1679)     at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)     at hudson.model.ResourceController.execute(ResourceController.java:88)     at hudson.model.Executor.run(Executor.java:230) Caused by: hudson.plugins.git.GitException: Command "fetch -t [email protected]:MyOrg/projectgroup/project1 +refs/heads/*:refs/remotes/origin/*" returned status code -1: stdout:  stderr:      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)     at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)     at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:187)     at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)     at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)     ... 10 more 
like image 535
user2481891 Avatar asked Nov 13 '13 13:11

user2481891


People also ask

How do I pull from Jenkins to GitHub?

Step 1: go to your GitHub repository and click on 'Settings'. Step 2: Click on Webhooks and then click on 'Add webhook'. Step 3: In the 'Payload URL' field, paste your Jenkins environment URL. At the end of this URL add /github-webhook/.

Does Jenkins work with GitHub?

Jenkins, itself located on GitHub, has a number of plugins for integrating into GitHub. The primary avenues for integrating your Jenkins instance with GitHub are: "build integration" - using GitHub to trigger builds.


1 Answers

I was about to use Workaround #2 but it seems as of git plugin 2.0.3 this can now be configured in the UI, although it is a bit hidden away and is per project.

Go to the configure screen for a project, Source Code Management section, Git, Additional Behaviors, Add, Advanced clone behaviors, Timeout (in minutes) for clone and fetch operation.

I would use workaround #2 as suggested by DevHopeful_2012 if you want a global setting.

like image 106
boinged Avatar answered Sep 30 '22 18:09

boinged