解决github打不开的方法

解决github打不开的方法

本文参考文章:解决可ping通但无法访问github网站的问题

一、确定域名github.com的ip地址

进入网址 IP/服务器github.com的信息 - 站长工具 (chinaz.com),查看 ip 地址。

复制代码
20.205.243.166 github.com

二、确定域名github.global.ssl.fastly.net的ip地址

进入网址 IP/服务器github.global.ssl.fastly.net的信息 - 站长工具 (chinaz.com) ,查看 ip 地址。

复制代码
108.160.170.39 github.global.ssl.fastly.net

三、确定github静态资源域名assets-cdn.github.com的ip地址

进入网址 https://ip.tool.chinaz.com/assets-cdn.github.com,有三个。

复制代码
185.199.111.153	assets-cdn.github.com
185.199.108.153	assets-cdn.github.com
185.199.109.153	assets-cdn.github.com

四、修改hosts文件

Ubuntu系统:sudo vim /etc/hosts

Windows系统:记事本打开 C:\Windows\System32\drivers\etc 找到hosts文件

在底部加入前三步获得的内容,即:

console 复制代码
20.205.243.166 github.com
108.160.170.39 github.global.ssl.fastly.net
185.199.111.153	assets-cdn.github.com
185.199.108.153	assets-cdn.github.com
185.199.109.153	assets-cdn.github.com

保存退出。

重启浏览器,再次访问。

5.199.109.153 assets-cdn.github.com

复制代码
保存退出。

重启浏览器,再次访问。

以后再不好使就是这些网址更新了,再改就行。
相关推荐
郭钊荣20 小时前
为什么 OpenClaw 能出圈:扒一扒小龙虾的agent系统设计
后端·github
Moment21 小时前
Cursor 的 5 种指令方法比较,你最喜欢哪一种?
前端·后端·github
子兮曰1 天前
async/await高级模式:async迭代器、错误边界与并发控制
前端·javascript·github
崔庆才丨静觅2 天前
Claude Code GitHub Actions 使用教程
github·api·claude
砖厂小工3 天前
用 GLM + OpenClaw 打造你的 AI PR Review Agent — 让龙虾帮你审代码
android·github
程序员鱼皮3 天前
又一个新项目完结,我要出海了!
ai·github·开源项目
徐小夕3 天前
pxcharts-vue:一款专为 Vue3 打造的开源多维表格解决方案
前端·vue.js·github
Moment3 天前
想要长期陪伴你的助理?先从部署一个 OpenClaw 开始 😍😍😍
前端·后端·github