git报错:curl 18 transfer closed with outstanding read data remaining
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
可能是tag资源太大引起的
可以尝试先浅拷贝,再fetch
git clone --depth=1 http://git地址
git fetch --unshallow
不知道你这个问题是否已经解决, 如果还没有解决的话:根据参考资料中的内容,可以尝试以下几种解决方案:
可以使用命令 git config --global http.postBuffer 2097152000
来增大缓存区,单位为字节。
可以使用命令 git clone https://github.com/... --depth 1
来进行浅克隆,只克隆最近一次提交的文件,不包括整个历史版本。这样可以减少下载量。
将 http 协议换成 SSH 协议。将 https://github.com/...
改为 git://github.com/...
。
如果以上三种解决方案均无效,可以尝试以下操作:
可以尝试下载该项目的 zip 文件,并在本地进行操作。也可以直接使用网页界面下载该项目的文件。
创建本地仓库后,使用命令 git remote add origin [远程仓库地址]
将本地仓库与远程仓库建立对应关系。再将下载的项目添加到本地仓库中,提交到本地仓库并推送到远程仓库建立连接。
注意:在推送到远程仓库前,可能需要先执行 git pull
命令,将本地和远程仓库同步。如果此时仍然出现报错,可以尝试切换网络。