Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
詹金斯&x2B;Git慢取和早期EOF_Git_Jenkins_Jenkins Plugins - Fatal编程技术网

詹金斯&x2B;Git慢取和早期EOF

詹金斯&x2B;Git慢取和早期EOF,git,jenkins,jenkins-plugins,Git,Jenkins,Jenkins Plugins,更新:在我们的例子中,jenkins workspace+构建的UNC共享有一个符号链接点。为这个项目重写本地目录似乎可以加快速度并解决这个特殊的问题。这个问题和其他任何想知道的人一样悬而未决 我们有Jenkins设置来构建企业GitHub实例中包含的几个不同的MSBuild项目 无论发生什么情况,这个特定的项目都无法从我们的存储库中完成获取。坚固的谷歌搜索似乎没有帮助,到目前为止,我发现的“解决方案”似乎不起作用(调整http.postBuffer),使用cmd\git.exe而不是bin\

更新:在我们的例子中,jenkins workspace+构建的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
错误:RPC失败;结果=56,HTTP代码=200

相当确定的是,result=56意味着您在克隆repo时遇到了网络错误或一些问题,导致curl无法下载


我建议您使用ssh而不是https来克隆存储库。如果可能的话,它更具弹性,并且通常问题更少。否则,可能会有防火墙或其他网络设备(VPN或本地反病毒)导致连接在克隆的中间停止。最终在Windows上安装时遇到了更多问题。令人难以置信的缓慢获取仍然存在。我还应该提到,我们让jenkins使用一个指向UNC路径的符号链接作为工作区和构建目录。重写此项目的本地目录似乎可以加快速度,而不会引起问题。我会把这个问题留待讨论,以防有人偶然发现。