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```