解决win中github下载慢的问题

第一步,查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

猜你喜欢

转载自blog.csdn.net/weixin_43818488/article/details/107638205
今日推荐