使用SourceTree来Clone代码时,报错“error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed”

一、背景说明

最近用SourceTree拉取代码时,由于项目比较大,导致拉取失败,具体失败信息如下:

 

二、解决方案

上网查找资料后发现:

  原因是,curl的postBuffer的默认值太小;

所以我们需要调整默认值,并在终端重新配置其大小。

 

三、具体操作

  1. 将postBuffer的值配置成500M(如有需要,可调整postBuffer的值)
  2. 在Git上输入命令:git config --global http.postBuffer 524288000
  3. 输入命令:git config --list 查看具体配置信息
  4. 再重新去SourceTree拉代码就可以用啦

posted @ 2020-04-29 10:40  私房de浅  阅读(2555)  评论(0)    收藏  举报