git clone download speed is slow Solution

git clone download speed is slow Solution

  1. In https://www.ipaddress.com Find http://github.comand http://global-ssl.fastly.Netcorresponding IP address, for example:
    1. 192.30.253.112 corresponding http://github.com
    2. 151.101.185.194 corresponding github.global.ssl.fastly.net

Mac follows:

  1. Open /etc/hosts, a copy of the hostsfile;
  2. The following is added to the copy of the hostsfile:

    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
  3. Replaced with a copy of the document hostsfile;
  4. Flush the DNS cache:sudo dscacheutil -flushcache

Under Windows:

  1. Use Notepad to open hoststhe file (path: C:\Windows\System32\drivers\etc\hosts)
  2. The following is added to the copy of the hostsfile:

    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
  3. Flush the DNS cache:ipconfig /flushdns

Guess you like

Origin www.cnblogs.com/cy521/p/10948235.html