在网上找了很久,下载了两个项目,都比较多,报错解决,最后总结如下:
报错详情
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 http.postBuffer 5242880002. 用上面的命令还不行的,用以下命令,只clone深度为一,少克隆一些;
git clone /github_com/large-repository --depth 1
git fetch --unshallow3. 我的用以上命令都不行,我使用了
git config --global http.sslVerify "false"4. 再不行的话,换协议git clone http方式换成SSH的方式,即 https:// 改为 git://(我一般都用http方式,用git方式要以前配置密钥,以前配置过得就不用)
将git clone https://github.com/flutter/flutter.git
换成git clone git://github.com/flutter/flutter.git