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

小鱼儿 2023-02-20 02:11 15阅读 0赞

报错信息

在这里插入图片描述

描述

  1. Cloning into 'geektime-ELK'...
  2. remote: Enumerating objects: 6, done.
  3. remote: Counting objects: 100% (6/6), done.
  4. remote: Compressing objects: 100% (5/5), done.
  5. error: RPC failed; curl 18 transfer closed with outstanding read data remaining
  6. fatal: the remote end hung up unexpectedly
  7. fatal: early EOF
  8. fatal: index-pack failed

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

解决办法

  1. 可能是资源太大。可在命令行输入:

    git config —global http.postBuffer 524288000

  2. 可能是网速太慢,导致运行失败。命令行输入:

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

  3. 如果依旧clone失败,则首先浅层clone,然后更新远程库到本地

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

参考:
https://blog.csdn.net/it\_liuchengli/article/details/77040806
https://www.cnblogs.com/zjfjava/p/10392150.html


UPDATE :

原标题是 git clone报错 error: RPC failed; curl 18 transfer closed with outstanding read data remaining,文章发布提示标题含有非法字符,把RPC failed; 去掉发布成功了。。我真的很疑惑,我写的是RPC又不是PRC,这CSDN就尼玛的离谱!

发表评论

表情:
评论列表 (有 0 条评论,15人围观)

还没有评论,来说两句吧...

相关阅读