修改本地主机 hosts文件 C:\Windows\System32\drivers\etc\hosts
本地主机的hosts文件用于存储域名解析。
- 使用管理员权限打开文件,然后在文件末尾添加如下内容:
#GitHub Start
192.30.253.112 Build software better, together
192.30.253.119 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
#GitHub End
- 用WIN +R快捷键打开运行窗口,输入命令:cmd ,并回车进入命令行窗口,接着输入命令:ipconfig /flushdns ,回车后执行刷新本地 DNS 缓存数据即可。
参考知乎文章:https://zhuanlan.zhihu.com/p/107196957