git clone报错error: RPC failed; curl 18 transfer closed with outstanding read data remaining

 

具体错误信息如下图:

 

 

 

    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

 

这个错误产生的原因是时间太久,资源太大。

基于此,第一种考量即扩大缓存区。即在命令行输入:

 

        git config --global http.postBuffer 524288000

 

 

 

然而这对我并没有用。

 

第二种可能是你网速太慢,导致运行失败。

因此我们可以输入:

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

 

问题解决,果然是因为我的网速太慢。😭

 

 

当然,这只对我的问题有效,并不一定所有人的问题都是一样的。此外,还有通过设置浅层clonessh替换https的方式。

posted @ 2019-10-19 00:02  LeftBody  阅读(1356)  评论(0编辑  收藏  举报