git clone项目报错的一些解决办法。
具体报错内容如下:
Clone failed
early EOF
The remote end hung up unexpectedly
index-pack failed
RPC failed; curl 18 transfer closed with outstanding read data remaining
一般是repo比较大,并且clone速度比较慢造成的。
方法一:
将 clone 地址的 https://
改为 git://
,再尝试重新 clone 项目。
方法二:
可以先设置深度为 1 进行浅克隆,克隆完成后再进行 update 操作更新项目代码。
git clone http://github.com/large-repository --depth 1
cd large-repository
git fetch --unshallow
方法三:
在linux系统的terminal中预先输入以下内容:
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
Windows系统则在GIT BASH中预先输入以下内容:
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
然后在进行git clone