git拉取代码错误解决办法

错误内容:
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
我感觉出现这个错误的主要原因可能是校园网网速太慢,我今天就跟这个github包杠上了,不信我下载不下来,我不是主要学网络这方面的,所以就是用网上的办法,一个一个试
首先解决Git的问题
解决办法
1.
首先执行
git config http.sslVerify "false"
若出现下列错误
git config http.sslVerify "false" fatal: not in a git directory
再继续执行
git config --globle http.sslVerify "false"
问题解决

git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m" 
git config --global pack.threads "1"
git config --global pack.window "0"

试过这两种方法,还是不行,所以使用下载压缩包的办法
压缩包下载失败

采用修改hosts的方法
在http://tool.chinaz.com/中使用DNS查询

59.24.3.173 github.global.ssl.fastly.net
151.101.24.133 assets-cdn.github.com
151.101.76.133 avatars0.githubusercontent.com
151.101.108.133 avatars1.githubusercontent.com
52.74.223.119 http://github.com
140.82.114.4 http://github.com

有一点点效果,但还是失败

在host中添加如下代码

# GitHub Start
140.82.114.4 github.com
192.30.255.119 gist.github.com
185.199.110.153 assets-cdn.github.com
151.101.228.133 raw.githubusercontent.com
151.101.228.133 gist.githubusercontent.com
151.101.228.133 cloud.githubusercontent.com
151.101.228.133 camo.githubusercontent.com
151.101.228.133 avatars0.githubusercontent.com
151.101.228.133 avatars1.githubusercontent.com
151.101.228.133 avatars2.githubusercontent.com
151.101.228.133 avatars3.githubusercontent.com
151.101.228.133 avatars4.githubusercontent.com
151.101.228.133 avatars5.githubusercontent.com
151.101.228.133 avatars6.githubusercontent.com
151.101.228.133 avatars7.githubusercontent.com
151.101.228.133 avatars8.githubusercontent.com
185.199.109.154 github.githubassets.com
151.101.109.194 github.global.ssl.fastly.net
# GitHub End

经过昨天晚上的测试,还是不行,卧谈会听取舍友建议,采用间接的办法
注册码云,将github中的仓库导入到码云中,通过码云拉去代码
问题解决

这么简单,昨天整了一晚上,发出来大家碰到相似问题参考吧

posted @ 2020-05-16 12:11  嗨喽来了  阅读(2435)  评论(0编辑  收藏  举报