git clone download speed is slow Solution
- In https://www.ipaddress.com Find
http://github.com
andhttp://global-ssl.fastly.Net
corresponding IP address, for example:192.30.253.112
correspondinghttp://github.com
151.101.185.194
correspondinggithub.global.ssl.fastly.net
Mac follows:
- Open
/etc/hosts
, a copy of thehosts
file; The following is added to the copy of the
hosts
file:192.30.253.112 github.com 151.101.185.194 github.global.ssl.fastly.net 151.101.184.249 global-ssl.fastly.net 185.199.111.153 assets-cdn.github.com
- Replaced with a copy of the document
hosts
file; Flush the DNS cache:
sudo dscacheutil -flushcache
Under Windows:
- Use Notepad to open
hosts
the file (path:C:\Windows\System32\drivers\etc\hosts
) The following is added to the copy of the
hosts
file:192.30.253.112 github.com 151.101.185.194 github.global.ssl.fastly.net 151.101.184.249 global-ssl.fastly.net 185.199.111.153 assets-cdn.github.com
Flush the DNS cache:
ipconfig /flushdns