Solution to the problem that git clone is too slow in Ubuntu/Linux/Win system

Step 1: Query the IP address with the fastest speed

Query the following three domain names in http://tool.chinaz.com/dns:

  • github.global.ssl.fastly.net
  • assets-cdn.github.com
  • github.com

Step 2: Modify the HOST file 

Enter the terminal command line mode and enter sudo gedit /etc/hosts

Add the corresponding IP and domain name at the end of the file. As follows: Record and change the IP you are querying!

151.101.16.249 github.global.ssl.fastly.net
151.101.100.133 assets-cdn.github.com
192.30.253.112 github.com

Step 3: Update DNS cache

sudo apt-get install nscd
sudo /etc/init.d/nscd restart

Finish!

Guess you like

Origin blog.csdn.net/qq_45577269/article/details/130779808