GitHub無法訪問

問題:

在訪問GitHub官網的時候無法加載網頁或者加載之後的排版錯亂亦或者加載很慢。

解決辦法:

爲了提高速度,可以使用HOSTS加速對Github網站加載的資源網站域名解析。

具體做法:

修改  C:\Windows\System32\drivers\etc  中的hosts文件(PS:若沒有修改權限,可以鼠標右鍵,屬性,安全,修改權限。或者將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 
# GitHub End

如果沒有立即恢復正常,需要刷新DNS緩存,告訴電腦我的hosts文件已經修改。Windows下刷新DNS緩存的方法:進入命令行,輸入命令:ipconfig /flushdns。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章