github打不开?这样解决
在国内环境,Github经常会遇到打不开的问题,并且有时能打开但是网速好慢,以下是解决办法。
1、通过站长工具找出DNS地址:进入站长工具网站的域名解析网址:http://tool.chinaz.com/dns/ ,在A类型的查询中输入github.com,找出最快的IP地址;
2.修改host文件,电脑的host文件一般在这个地址,只需复制在我的电脑导航栏粘贴即可
- C:\Windows\System32\Drivers\etc
打开后我们会看到这个界面,然后我们将host以文本形式打开
3.我们将host文件以记事本方式打开,然后在文件底部加上以下文字:
- #github
- 20.205.243.166 github.com
- 20.205.243.166 gist.github.com
- 20.205.243.166 assets-cdn.github.com
- 20.205.243.166 raw.githubusercontent.com
- 20.205.243.166 gist.githubusercontent.com
- 20.205.243.166 cloud.githubusercontent.com
- 20.205.243.166 camo.githubusercontent.com
- 20.205.243.166 avatars0.githubusercontent.com
- 20.205.243.166 avatars1.githubusercontent.com
- 20.205.243.166 avatars2.githubusercontent.com
- 20.205.243.166 avatars3.githubusercontent.com
- 20.205.243.166 avatars4.githubusercontent.com
- 20.205.243.166 avatars5.githubusercontent.com
- 20.205.243.166 avatars6.githubusercontent.com
- 20.205.243.166 avatars7.githubusercontent.com
- 20.205.243.166 avatars8.githubusercontent.com
4.ctrl+s保存文件即可。
注:
20.205.243.166 是查找的github的网址
151.101.113.194是查找github.global.ssl.fastly.net网址
请替换为你查找的IP地址
【你找到的最快的IP地址】 github.com
以后这个IP可能会再次不能用,则需要重新修改或者注释掉。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
2021-06-23 Ubuntu下安装微信
2021-06-23 python判断数组中是否有重复元素
2021-06-23 python构建数组