Jenkins在获取git存储库时会产生致命的EOF



我们的存储库从SVN切换到了Git,这相当平静。我们现在唯一的麻烦是Jenkins拒绝获取我们的新Git存储库。我们的Git存储库托管在Atlassian Stash上,它被配置为公共只读http存储库。

我尝试了好几件事,但都没有成功。Git存储库使用Source Tree和Visual Studio 2013正确获取。

Stash作为"本地系统"用户下的服务在Windows 8计算机上运行。我尝试将其配置为在关闭压缩的本地用户帐户下运行(core.compressure 0)。

我已尝试使用C:Program Files (x86)Gitbingit.exeC:Program Files (x86)Gitcmdgit.exe

它产生的输出如下:

Receiving objects:  82% (19700/23879), 106.27 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:1442)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1230)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:645)
    ... 10 more

尽管我尝试过Jenkins和GIT插件的早期版本,但它在最新的软件版本中也失败了,即:

  • git版本1.9.4.msysgit.2
  • 詹金斯1.588
  • GIT客户端插件1.11.1
  • GIT插件2.2.7

您可以通过增加http缓冲区大小来避免索引包:

git config --global http.postBuffer 1048576000

来自git手册:

http.postBuffer

将数据发布到远程系统时,智能HTTP传输使用的缓冲区的最大大小(以字节为单位)。对于大于此缓冲区大小的请求,HTTP/1.1和传输编码:chunked用于避免在本地创建大型包文件。默认值为1MIB,这对于大多数请求来说已经足够了。

这似乎有违直觉,但这通常有助于克隆和拉取。

最新更新