報錯信息
描述
Cloning into 'geektime-ELK'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (5/5), 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 config --global http.postBuffer 524288000
- 可能是網速太慢,導致運行失敗。命令行輸入:
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
- 如果依舊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就尼瑪的離譜!