wrong description
Today a project using git clone code on GitHub, git clone https://github.com/XXXX/xxx-blog.git download speed is very slow, and then after a period of time to download, always prompt the following error message:
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (8/8), done.
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
wrong reason
Because Http protocol error, or when the pull when the clone, or a github CDN is due to the great wall shielding.
Solution 1
Protocol error
First execute the following command
git config --global http.postBuffer 524288000
Then execution git pull
or git clone
command
Solution 2
Wall shield
Visit http: //github.global.ssl.fast ... get cdn domain names and IP addresses
Visit http: //github.com.ipaddress.c ... get cdn domain names and IP addresses
Modify the hosts file
Adding the acquired IP address to the hosts file in the
Mac in the /etc/hosts
middle;
Windows in the C:\Windows\System32\drivers\etc\hosts
middle;
# fix git clone github project failed
140.82.113.3 github.com
199.232.5.194 github.global.ssl.fastly.net
Flush the DNS cache
Mac flush the DNS cache
sudo killall -HUP mDNSResponder
sudo dscacheutil -flushcache
Windows Update DNS cache
cmd command window to perform:
ipconfig /flushdns
Mapping the increase to take effect.