GitHub 下载项目错误集合小记
git clone错误之"error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054"
当我们使用git clone指令从github 上download其它优秀的代码时,如果报如下错误
RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno
10054 the remote end hung up unexpectedly early EOF index-pack failed
这是因为服务器的SSL证书没有经过第三方机构的签署,所以才报错。解决方案如下:
第一步,克隆远程仓库时,用env命令设置GIT_SSL_NO_VERIFY环境变量为”ture”,并同时调用正常的git clone命令。完整的命令如下:
env GIT_SSL_NO_VERIFY=true git clone https://<host_name/git/project.git
第二步,在克隆完毕的仓库中将http.sslVerify设置为”false”。完整的命令如下:
git config http.sslVerify "false"
备注:以上方法应该是Git处理可信任的SSL临时证书很好的方法,第一步使用env命令保证了忽略证书错误是单次行为,不会成为默认的设置。第二次,则把忽略证书错误的设置限定在特定的仓库,避免扩大该设置的适用范围而引起的潜在安全风险。
-----------------------------------------------------------------------------------分割线-----------------------------------------------------------------------------
git报错:early EOF The remote end hung up unexpectedly index-pack failed RPC failed
在idea同步项目,结果在 clone 的过程中遇到了下面的错误。
$ git clone -v https://github.com/luqiang111/xmall.git
Cloning into ‘butterfly025’…
remote: Counting objects: 4846, done.
remote: Compressing objects: 100% (3256/3256), done.
fatal: read error: Invalid argument, 255.05 MiB | 1.35 MiB/s
fatal: early EOF
fatal: index-pack failed
First, turn off compression:
git config --global core.compression 0
Next, let’s do a partial clone to truncate the amount of info coming down:
git clone --depth 1 <repo_URI>
When that works, go into the new directory and retrieve the rest of the clone:
git fetch --unshallow
or, alternately,
git fetch --depth=2147483647
Now, do a regular pull:
git pull --all
I think there is a glitch with msysgit in the 1.8.x versions that exacerbates these symptoms, so another option is to try with an earlier version of git (<= 1.8.3, I think).
参考:https://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed
-----------------------------------------------------------------------------------分割线-----------------------------------------------------------------------------
idea git clone 遇到"unable to access :error setting certificate verify locations"问题
解决办法:进入git-bash窗口,输入命令: git config --system http.sslverify
false,即可解决问题。
※中间还升级过一次Git,不知道会不会有关系;
直接贴命令,比较简单
打开Git Bash,输入
git update-git-for-windows