解决git报错: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

改为只clone深度为一

git clone /github_com/large-repository --depth 1
cd large-repository
git fetch --unshallow

中划线处填入你的git仓库的地址。。。(我用的是http方式,不是ssh)

解决方式二,一般clone http方式的容易产生此问题,改成SSH的方式也有效,即https://改为git://   (亲测有效,直接用这个方法即可

 
---------------------
作者:LCLH
来源:CSDN
原文:https://blog.csdn.net/it_liuchengli/article/details/77040806
版权声明:本文为博主原创文章,转载请附上博文链接!

原文地址:https://www.cnblogs.com/afeiyuanda/p/10935108.html