方法:修改 C:\Windows\System32\drivers\etc下的hosts文件
步骤:
1. 获取IP地址,在电脑的浏览器的网站输入框输入:https://www.ipaddress.com/

然后分别查询github.com、assets-cdn.github.com 、github.global.ssl.fastly.net三个链接的DNS解析地址,找到解析出来的IP地址。
github.com
assets-cdn.github.com
github.global.ssl.fastly.net
github.com,注意:不同电脑搜索结果可能也不同

assets-cdn.github.com,注意:任选其一即可

github.global.ssl.fastly.net,注意:不同电脑搜索结果可能也不同

2. 修改电脑hosts文件:路径:C:\Windows\System32\drivers\etc
把刚刚查到信息添加到hosts文件里,如下:
140.82.112.4 github.com
185.199.108.153 assets-cdn.github.com
199.232.69.194 github.global.ssl.fastly.net



3. 刷新本机的DNS缓存
打开命令提示符

输入命令:ipconfig /flushdns

界面会显示已成功刷新 DNS 解析缓存。,如下图:

重新登进Github就会很快啦!

网友评论