­

Github加載及下載問題

  • 2019 年 10 月 7 日
  • 筆記

版權聲明:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。

本文鏈接:https://blog.csdn.net/github_39655029/article/details/101066405

問題

對於我們國內用戶,有時候瀏覽器在進入github網站時,會出現無法加載或加載很慢的問題,針對這一問題,很是頭疼,為解決這一問題,在網上搜索到的解決方法如下;

解決方案

  • 修改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  # 下載慢問題  219.76.4.4 github-cloud.s3.amazonaws.com  # GitHub End
  • hosts文件所在目錄
    - Windows:```C:WindowsSystem32driversetchosts```      - Linux:```etchosts```
  • 修改後生效方法
    - 關機重啟      - 斷網重連      - Window:Win R,輸入cmd回車,然後在cmd窗口中輸入:```ipconfig /flushdns```      - Linux:Ctrl Alt T打開終端,輸入```sudo rcnscd restart```