Solve the problem that the clone project on GitHub is too slow

Time:2021-10-13

Problem solving

Git clone is particularly slow because the github.global.ssl.fast.net domain name is limited.

Just find the IP address corresponding to the domain name, and then add the mapping of IP – > domain name in the hosts file to refresh the DNS cache.

step

1. Search

Search separately at www.ipaddress.com /

  • github.global.ssl.fastly.net
  • github.com

The IP addresses corresponding to these two domain names

Solve the problem that the clone project on GitHub is too slow

Solve the problem that the clone project on GitHub is too slow

2. Change the hosts file

On windows, use the administrator to open notepad and then open the file in the above file path to change.

  • The hosts file path on windows is
C:\Windows\System32\drivers\etc\hosts
  • The Linux hosts file path is sudo VIM / etc / hosts

Add to file

199.232.69.194 github.global-ssl.fastly.net

140.82.114.3 github.com

3. Save and update DNS

  • The method of windows system: open CMD and enter ipconfig / flushdns
  • Linux method: enter sudo / etc / init.d/networking restart on the terminal

[transfer] https://blog.csdn.net/qq_ 2064…