【2020最新】解決Github連接、圖片顯示失敗的問題

建議修改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就可以了。

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