解决github没法访问的问题,亲测有效。

  • 最近发现github忽然打不开了。通过一番搜索,终于找到一个改host的方法使得能够正常打开github,并且发现打开速度比以前还快。你们也能够试试。
  • C:\Windows\System32\drivers\etc中打开host文件(能够用UE等编辑工具打开),在该文件中添加以下内容。
# GitHub Start 
140.82.114.4 github.com
140.82.114.4 gist.github.com
185.199.108.153 assets-cdn.github.com
151.101.64.133 raw.githubusercontent.com
151.101.108.133 gist.githubusercontent.com
151.101.108.133 cloud.githubusercontent.com
151.101.108.133 camo.githubusercontent.com
151.101.108.133 avatars0.githubusercontent.com
151.101.108.133 avatars1.githubusercontent.com
151.101.108.133 avatars2.githubusercontent.com
151.101.108.133 avatars3.githubusercontent.com
151.101.108.133 avatars4.githubusercontent.com
151.101.108.133 avatars5.githubusercontent.com
151.101.108.133 avatars6.githubusercontent.com
151.101.108.133 avatars7.githubusercontent.com
151.101.108.133 avatars8.githubusercontent.com 
# GitHub End
  • 保存文件,从新刷新网页便可打开github了。
  • github打开慢的同窗,也能够试试这个方法。