首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >github的hosts

github的hosts

作者头像
西方记者
发布2022-02-25 18:06:05
发布2022-02-25 18:06:05
2.6K00
代码可运行
举报
运行总次数:0
代码可运行

部分地区异常 领卷瓢的良心云鸡都跑不动脚本 改host就能解决 这边贴一下

windows路径C: / Windows / System32 / drivers/ etc / hosts

Linux路径/etc/hosts

代码语言:javascript
代码运行次数:0
运行
复制
140.82.114.3 github.com
140.82.113.4 gist.github.com
185.199.108.153 assets-cdn.github.com
185.199.108.133 raw.githubusercontent.com
185.199.108.153 gist.githubusercontent.com
185.199.108.153 cloud.githubusercontent.com
185.199.108.153 camo.githubusercontent.com
185.199.108.153 avatars0.githubusercontent.com
185.199.108.153 avatars1.githubusercontent.com
185.199.108.153 avatars2.githubusercontent.com
185.199.108.153 avatars3.githubusercontent.com
185.199.108.153 avatars4.githubusercontent.com
185.199.108.153 avatars5.githubusercontent.com
185.199.108.153 avatars6.githubusercontent.com
185.199.108.153 avatars7.githubusercontent.com
185.199.108.153 avatars8.githubusercontent.com
54.157.58.70 git.io

reboot即可

那么问题就来了 上面的失效咋办

那就另请高明把 我也不是谦虚

获取GitHub官方CDN地址

打开https://www.ipaddress.com/

查询以下三个链接的DNS解析地址

  1. github.com
  2. assets-cdn.github.com
  3. github.global.ssl.fastly.net
  4. codeload.github.com (下载链接的实际地址) raw.githubusercontent.com 如

192.30.253.112 github.com

185.199.108.153 assets-cdn.github.com

151.101.185.194 github.global.ssl.fastly.net

140.82.113.10 codeload.github.com

打开DNS

vi /etc/resolv.conf

更新DNS缓存,输入sudo /etc/init.d/networking restart

Ubuntu:sudo systemctl restart nscd

版权声明:本文为原创文章,版权归 乱写的博客 所有,转载请注明本站

本文地址:https://cloud.tencent.com/developer/article/1947632

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019年10月29日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档