解決 Github 打不開或打開很慢的問題
方法一
一、確定 github 網站的 ip
打開網址:http://github.com.ipaddress.com/

192.30.253.112 github.com
192.30.253.113 github.com
二、確定域名ip
打開網址:http://github.global.ssl.fastly.net.ipaddress.com/

或者是

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/

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 地址
- 百度搜索“查詢網址DNS”,或者可以直接輸入網址 https://tool.chinaz.com/dns/
- 檢測 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 環境。
