九零不老心
发布于 2019-07-01 / 10 阅读 / 0 评论 / 0 点赞

git加速

git clone 很慢?多半是dns污染!解决办法:
  1. 通过https://www.ipaddress.com/查询,三个域名:github.com、assets-cdn.github.com、github.global.ssl.fastly.net对应的ip地址(assets-cdn.github.com有多个ip解析,可以启用1个停用其他,尝试每个ip的速度如何,最后选择最佳的那个!)
  2. 将ip和对应域名添加到本地hosts文件
  3. 刷新本地dns解析cmd执行ipconfig /flushdns(linux不用)
  4. 重新git clone看看速度