当前位置:   article > 正文

git clone报错RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)_not closed cleanly: cancel (err 8) 2549 bytes of b

not closed cleanly: cancel (err 8) 2549 bytes of body are still expected fet

error:RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
在这里插入图片描述

git config --global http.version HTTP/1.1
  • 1

参考链接

然后又报了error:RPC failed; curl 18 transfer closed with outstanding read data remaining

在这里插入图片描述
后面上网查,竟然是因为网慢

这种情况经常发生,我的互联网连接速度很慢,我必须克隆一个相当大的 git 存储库。最常见的问题是连接关闭并且整个克隆被取消。
Cloning into ‘large-repository’…
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/10204), done.
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 clone http://github.com/large-repository --depth 1
$ cd large-repository
$ git fetch --unshallow

成功了成功了

在这里插入图片描述

参考链接

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

闽ICP备14008679号