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
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值