1. 程式人生 > >修改hosts來正常訪問github

修改hosts來正常訪問github

  • github是一個活躍度高、氛圍很好的開源社群,裡面有很多優秀的個人及企業級專案,也支援用git去管理自己的專案,便於團隊共同開發。但是由於GFW的存在,訪問github偶爾會出現資源無法完整載入或者載入很慢的狀況,這時候就需要在hosts檔案中新增一些域名對映來改善github的訪問。windows系統的hosts檔案放在C:\Windows\System32\drivers\etc路徑下,而linux系統的hosts檔案放在\etc路徑下,具體要在hosts檔案新增的內容如下:
# GitHub Start 
192.30.253.112 github.com 
192.30.253.113 github.com 
192.30.253.119 gist.github.com 
151.101.185.194 github.global.ssl.fastly.net
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

END