Jenkins中Git Timeout错误

现象描述;


在Jenkins构建代码时候,出现以下错误:


ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://XXXXXXXXXXXXXXXX.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115)
	at hudson.scm.SCM.checkout(SCM.java:496)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
	at hudson.model.Run.execute(Run.java:1728)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:542)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:405)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress http://XXXXXXXXXXXXXXXX.git +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout: 
stderr: remote: Counting objects: 1   [K
remote: Counting objects: 3227   [K
.
.
.
 
 
remote: Getting sizes:  92% (203584/220063)   [K
remote: Getting sizes:  93% (204659/220063)   [K
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1643)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:352)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:815)
	... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
 
 

措施:

Solution steps:

  1. For resolve the problem we have to edit in Jenkins project configuration and find the "git".
  2. Then click on "Add" button and select "Advanced clone behaviours".
  3. Then in Timeout (in minutes) for clone and fetch operations box put any number which is more then 10, (I put 60 here).
  4. Apply and the save the configuration.
  5. Build Now again , It took some more time to build , but it will fixed this error.
参考资料:
https://stackoverflow.com/questions/22013217/on-building-jenkins-project-timeout-after-10-minute-error-happens

猜你喜欢

转载自blog.csdn.net/cyyingsun/article/details/78286175