Loading

解决 Github 打不开或打开很慢的问题

解决 Github 打不开或打开很慢的问题

方法一

一、确定 github 网站的 ip

打开网址:http://github.com.ipaddress.com/

img

192.30.253.112 github.com
192.30.253.113 github.com

二、确定域名ip

打开网址:http://github.global.ssl.fastly.net.ipaddress.com/

img

或者是

img

151.101.185.194 github.global.ssl.fastly.net
151.101.13.194 github.global.ssl.fastly.net

三、确定静态资源ip

打开网址:http://assets-cdn.github.com.ipaddress.com/

img

151.101.12.133 assets-cdn.github.com
151.101.184.133 assets-cdn.github.com

四、修改hosts文件

Windows 系统的 host 文件位置 C:\Windows\System32\drivers\etc

192.30.253.112  Build software better, together
192.30.253.113  Build software better, together
151.101.185.194 github.global.ssl.fastly.net
151.101.13.194  github.global.ssl.fastly.net
151.101.12.133  assets-cdn.github.com
151.101.184.133 assets-cdn.github.com

修改后命令行运行 ipconfig /flushdns

附:https://www.ipaddress.com/ 此网站可以查询网址的 IP。

方法二

查询 github.com 的 DNS 地址

  1. 百度搜索“查询网址DNS”,或者可以直接输入网址 https://tool.chinaz.com/dns/
  2. 检测 https://github.com 得到响应 IP,添加 IP 到 hosts 文件中。
13.229.188.59 github.com
203.208.39.99 github.com 
140.82.114.3  github.com

方法三

使用工具,工具地址:https://github.com/luozheao/setHost

需要安装 nodejs 环境。

posted @ 2021-07-22 11:00  静看岁月荏苒  阅读(21820)  评论(0编辑  收藏  举报