Git error: RPC 失败; curl 18 传输已关闭 的解决方法
error information
Cloning into 'xxx'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), 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
1. 加大缓存区
$ git config –global http.postBuffer 524288000
这个大约是 500M
2. 少 clone 一些:–depth 1
$ git clone https://github.com/flutter/flutter.git –depth 1
–depth 1
的含义是复制深度为 1,就是每个文件只取最近一次提交,不是整个历史版本。
3. 换协议
clone http 方式换成 SSH 的方式,即 https:// 改为 git://
$ git clone https://github.com/flutter/flutter.git
$ git clone git://github.com/flutter/flutter.git
注意,不是
git@...
,比如:git clone git@github.com:flutter/flutter.git
这样会遇到一些问题比如:
Cloning into 'chord-detection'...
The authenticity of host 'github.com (52.74.223.119)' can't be established.
RSA key fingerprint is SHA256:.......
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository
暂时记录下,这个问题下次解决。
本作品采用《CC 协议》,转载必须注明作者和本文链接