現象:
國內從github clone或pull時速度很慢,容易超時被服務器掐斷鏈接
解決方法:
-
訪問https://www.ipaddress.com/
分別查詢 github.com 和 github.global.ssl.fastly.net 的IP地址
-
在hosts文件[ C:\Windows\System32\drivers\etc\hosts ]中添加如下內容
140.82.112.4 github.com 199.232.5.194 github.global.ssl.fastly.net
-
cmd命令行刷新DNS(windows平臺)
ipconfig/flushdns