第一步,查GitHub的ip

网址为https://www.ipaddress.com

查询http://github.global.ssl.fastly.net和http://github.com分别发现对应的ip如下:

199.232.69.194   http://github.global.ssl.fastly.net
140.82.112.3       http://github.com

第二步,hosts文件中添加

windows系统的hosts文件的位置如下:

C:\Windows\System32\drivers\etc\hosts

把hosts文件复制到桌面,并用txt打开,再最后添加三行

# github
199.232.69.194   http://github.global.ssl.fastly.net
140.82.112.3       http://github.com


再替换到C:\Windows\System32\drivers\etc\hosts

第三步,刷新 DNS 缓存

在终端或CMD中,执行以下命令:

ipconfig /flushdns
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐