github打不开,可以这样解决

在一杯明月博客园中看到的此方法

在国内经常打不开Github,有时能打开但是网速好慢,以下是解决办法。

1、通过站长工具找出DNS地址:进入站长工具网站的域名解析网址:http://tool.chinaz.com/dns/ ,在DNS查询中输入github.com,点击立即检测,找出最快的IP地址;

然后下拉看结果,点击解析时间排序,时间最小的就是网速最快的地址:

2.修改host文件,电脑的host文件一般在这个地址,只需复制在我的电脑导航栏粘贴即可

  1. C:\Windows\System32\Drivers\etc

打开后我们会看到这个界面,然后我们将host以文本形式打开

3.我们将host文件以记事本方式打开,然后在文件底部加上以下文字:

  1. #github
  2. 20.205.243.166  github.com
  3. 20.205.243.166  gist.github.com
  4. 20.205.243.166  assets-cdn.github.com
  5. 20.205.243.166  raw.githubusercontent.com
  6. 20.205.243.166  gist.githubusercontent.com
  7. 20.205.243.166  cloud.githubusercontent.com
  8. 20.205.243.166  camo.githubusercontent.com
  9. 20.205.243.166  avatars0.githubusercontent.com
  10. 20.205.243.166 avatars1.githubusercontent.com
  11. 20.205.243.166 avatars2.githubusercontent.com
  12. 20.205.243.166 avatars3.githubusercontent.com
  13. 20.205.243.166 avatars4.githubusercontent.com
  14. 20.205.243.166 avatars5.githubusercontent.com
  15. 20.205.243.166 avatars6.githubusercontent.com
  16. 20.205.243.166 avatars7.githubusercontent.com
  17. 20.205.243.166 avatars8.githubusercontent.com

4.ctrl+s保存文件即可。
注:
20.205.243.166 是查找的github的网址,请替换为你查找的最快的IP地址
以后这个IP可能会再次不能用,需重新查找最快的IP地址。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值