报错信息:
using GIT_ASKPASS to set credentials
> git fetch --tags --force --progress -- http://39.98.84.181:8081/huangzhanqiu/hanvonscanner.git +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://39.98.84.181:8081/huangzhanqiu/hanvonscanner.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1241)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
at hudson.scm.SCM.checkout(SCM.java:540)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1248)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:521)
at hudson.model.Run.execute(Run.java:1894)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- http://39.98.84.181:8081/huangzhanqiu/hanvonscanner.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
看报错信息是git代码拉取超时了,所以在jenkins任务中增加超时时间
依次打开:配置->Additional Behaviours->高级的克隆行为