Github is generally used for Git remote warehouses. Since the server is located abroad, the domestic access speed is relatively slow. In order to improve the access speed, it was decided to bypass DNS domain name resolution.
Get the IP address of Github
Press ctrl+alt+T to open the command terminal and enter:
nslookup github.com
Get the IP address of github.global.ssl.fastly.net
Press ctrl+alt+T to open the command terminal and enter:
nslookup github.global.ssl.fastly.net
Write to hosts file, refresh cache
Press ctrl+alt+T to open the command terminal and enter:
sudo gedit /etc/hosts
Then add at the end of the file:
Finally refresh the cache: enter in the command terminal:
sudo /etc/init.d/networking restart
You're done, give it a try!