当前位置:   article > 正文

git clone时curl 18 transfer closed with outstanding read data remaining_error: rpc failed; curl 18 transfer closed with ou

error: rpc failed; curl 18 transfer closed with outstanding read data remain

下载自己github上的项目,结果因为太慢,失败了好几次,以为公司网络问题,回到住所后下载也出现了这个问题,这就没法忍了,于是上网查了下,特此记录下。

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

原因1:缓存区溢出。curl的postBuffer的默认值太小,我们需要调整它的大小,在终端重新配置大小在这里,笔者把postBuffer的值配置成500M

解决方法:命令行输入

git config http.postBuffer 524288000

执行上面命令要在git安装目录下,如果配置报错fatal: not in a git directory那就放弃吧,可能版本不支持。

如果配置成功依旧clone失败,考虑可能原因2:网络下载速度缓慢

解决方法:命令行输入

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

 如果依旧clone失败,则首先浅层clone,然后更新远程库到本地,亲测,第三种最快

  1. git clone --depth=1 http://gitlab.xxx.cn/yyy/zzz.git
  2. git fetch --unshallow

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/707499
推荐阅读
相关标签
  

闽ICP备14008679号