windows下 git clone 速度慢

windows下 git clone 速度慢

    • 1、查询IP地址
    • 2、修改hosts文件
    • 刷新DNS缓存

链接一下,方面查阅:https://www.linuxidc.com/Linux/2019-05/158461.htm

1、查询IP地址

可以使用https://www.ipaddress.com/来查询github.global.ssl.fastly.net和github.com的IP地址。比如我这里查的分别是151.101.185.194和192.30.253.113

2、修改hosts文件

windows文件位置 C:\Windows\System32\drivers\etc\hosts
Linux和Mac文件位置 /etc/hosts
在hosts文件末尾添加两行:
github.com 13.229.188.59
github.global.ssl.fastly.Net 151.101.229.194

刷新DNS缓存

windows命令 ipconfig /flushdns
linux命令 sudo /etc/init.d/networking restart
Mac命令 sudo killall -HUP mDNSResponder

你可能感兴趣的:(小技巧)