问题
对于我们国内用户,有时候浏览器在进入github网站时,会出现无法加载或加载很慢的问题,针对这一问题,很是头疼,为解决这一问题,在网上搜索到的解决方法如下;
解决方案
- 修改hosts文件,在hosts文件中加入以下内容:
# GitHub Start
# 针对无法加载或加载慢的问题
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com
# 下载慢问题
219.76.4.4 github-cloud.s3.amazonaws.com
# GitHub End
-
hosts文件所在目录
- Windows:
C:\Windows\System32\drivers\etc\hosts
- Linux:
\etc\hosts
- Windows:
-
修改后生效方法
- 关机重启
- 断网重连
- Window:Win+R,输入cmd回车,然后在cmd窗口中输入:
ipconfig /flushdns
- Linux:Ctrl+Alt+T打开终端,输入
sudo rcnscd restart
欢迎关注微信公众号:村雨1943;创作不易,未经同意,转载请注明出处~