UPDATE:在我们的例子中,我们有一个符号链接点指向jenkins workspace + builds的UNC共享。覆盖此项目的本地目录似乎可以加快速度并解决这个特殊问题。对于其他任何想知道的问题,这个问题仍然是开放的。
我们有Jenkins设置来构建企业GitHub实例中包含的几个不同的MSBuild项目。
这个特殊的项目无论如何都无法完成从我们的存储库中获取。坚固的谷歌似乎没有帮助,到目前为止,"解决方案"我发现似乎没有工作(调整http.postBuffer),使用cmd \ git.exe而不是bin \ git.exe等。
可能导致此问题的原因是什么?
using .gitcredentials to set credentials
> C:\Program Files (x86)\Git\cmd\git.exe config --local credential.helper store --file=\"C:\Users\S-STRA~1\AppData\Local\Temp\git4112069888826894851.credentials\" # timeout=10
> C:\Program Files (x86)\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress https://github.example.net/orgname/project.git +refs/heads/*:refs/remotes/origin/*
> C:\Program Files (x86)\Git\cmd\git.exe config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.example.net/orgname/project.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1744)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress https://github.example.net/orgname/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Counting objects: 4967, done.[K
remote: Compressing objects: 0% (1/2307) [K
remote: Compressing objects: 1% (24/2307) [K
remote: Compressing objects: 2% (47/2307) [K
...keeps going...
Receiving objects: 51% (2534/4967), 1.35 MiB | 6.00 KiB/s
Receiving objects: 51% (2549/4967), 1.35 MiB | 6.00 KiB/s
Receiving objects: 51% (2575/4967), 1.36 MiB | 6.00 KiB/s
fatal: early EOF
fatal: The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=56, HTTP code = 200
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733)
... 11 more
ERROR: Error fetching remote repo 'origin'
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
答案 0 :(得分:1)
“错误:RPC失败;结果= 56,HTTP代码= 200”
相当肯定result = 56意味着您在克隆阻止curl下载的repo时遇到网络错误或某些问题。
我建议您使用ssh而不是https来克隆存储库(如果可能),它更具弹性并且通常具有较少的问题。否则,可能会有防火墙或其他网络设备(VPN或本地防病毒)导致连接在克隆中停止。