参考链接:
https://blog.csdn.net/tsq292978891/article/details/78260066
https://blog.csdn.net/x_studying/article/details/72588324
手动更改hosts 文件
在这个网站上找到github使用到的网站最快的IP地址
http://github.com.ipaddress.com/
当前日期20180724下,我查阅到的IP对应为:
151.101.185.194 github.global.ssl.fastly.net
192.30.253.112 Github.com
我就添加了上面两个地址,其他的用到的不多,也列出来吧
# Github
151.101.185.194 github.global.ssl.fastly.net
192.30.253.112 github.com
103.245.222.133 assets-cdn.github.com
23.235.47.133 assets-cdn.github.com
203.208.39.104 assets-cdn.github.com
204.232.175.78 documentcloud.github.com
204.232.175.94 gist.github.com
107.21.116.220 help.github.com
207.97.227.252 nodeload.github.com
199.27.76.130 raw.github.com
107.22.3.110 status.github.com
204.232.175.78 training.github.com
207.97.227.243 www.github.com
185.31.16.184 github.global.ssl.fastly.net
185.31.18.133 avatars0.githubusercontent.com
185.31.19.133 avatars1.githubusercontent.com
修改完hosts还不会立即生效,你需要刷新DNS缓存,告诉电脑我的hosts文件已经修改了。
windows下刷新DNS的方法:
打开CMD
输入ipconfig /flushdns