建議修改hosts
文件,本人使用的是windows
系統,使用EditPlus或sublime text
都可以打開。
沒有EditPlus的同學可以點擊連接下載:http://www.pc6.com/softview/SoftView_36775.html
hosts文件位置:C:\Windows\System32\drivers\etc\hosts
在hosts文件末尾添加:
# GitHub Start
140.82.113.3 github.com
140.82.114.20 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
199.232.68.133 avatars0.githubusercontent.com
199.232.28.133 avatars1.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com
# GitHub End
修改完如上圖,然後保存文件就OK了,至於無法保存,沒有修改權限,鼠標右鍵-屬性-安全-修改權限;或將hosts
文件複製一份,修改之後,複製到原文件夾替換!
最後建議對本地DNS緩存進行一次刷新。
windows開始→運行→輸入:CMD 按回車鍵,打開命令提示符窗口依次輸入下面兩行命令:
ipconfig /flushdns # 刷新DNS記錄
ipconfig /renew # 重請從DHCP服務器獲得IP
再次打開github就可以了。