转载-配置hosts快速访问GitHub(亲测可用)

GitHub最近老是上不去,ping总是请求超时,通过修改hosts文件可以解决这个问题
转载自https://blog.csdn.net/random0708/article/details/106001665/
感谢博主:IT油条

hosts文件路径

C:\Windows\System32\drivers\etc\hosts

添加hosts配置

140.82.112.3 github.com
140.82.114.4 gist.github.com
185.199.108.153 assets-cdn.github.com
199.232.68.133 raw.githubusercontent.com
199.232.68.133 gist.githubusercontent.com
199.232.68.133 cloud.githubusercontent.com
199.232.68.133 camo.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com

通过以下网站获取所有github网址的IP地址

https://github.com.ipaddress.com

cmd刷新DNS缓存

ipconfig /flushdns

再试着ping一下,发现4个包只有一个请求超时,已经可以上去了

访问归访问,下载归下载,GitHub下载慢就用码云,https://blog.csdn.net/qigeyonghuming_1/article/details/109105140

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值