git pull origin master报错
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
Clone failed
RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
the remote end hung up unexpectedly
early EOF
index-pack failed
原因
网速被限
解决方案
https://www.ipaddress.com/
github.global.ssl.fastly.net
github.com
-
搜索以上两个地址的IP
-
打开hosts文件
-
Windows上的hosts文件路径在C:\Windows\System32\drivers\etc\hosts
-
Linux的hosts文件路径在:sudo vim /etc/hosts
-
-
在hosts文件末尾添加两行(对应上面查到的ip)
https://github.com.ipaddress.com/
在hosts文件末尾添加两行(对应上面查到的ip)例如
199.232.69.194 github.global-ssl.fastly.net
140.82.114.3 github.com
请自己即时查ip地址
140.82.112.3 github.com
最后一步 保存更新DNS
- Winodws系统的做法:打开CMD,输入ipconfig /flushdns
- Linux的做法:在终端输入sudo /etc/init.d/networking restart