美文网首页
git clone 下载速度慢的解决方法

git clone 下载速度慢的解决方法

作者: AngeloD | 来源:发表于2019-05-30 10:37 被阅读0次

    git clone 下载速度慢的解决方法

    1. https://www.ipaddress.com 查找 http://github.comhttp://global-ssl.fastly.Net 对应的IP地址,例如:
      1. 192.30.253.112 对应的 http://github.com
      2. 151.101.185.194 对应的 github.global.ssl.fastly.net

    Mac下:

    1. 打开/etc/hosts,拷贝出该hosts文件;

    2. 将下列内容加入到拷贝出的hosts文件中:

      192.30.253.112 github.com
      151.101.185.194 github.global.ssl.fastly.net
      151.101.184.249 global-ssl.fastly.net
      185.199.111.153 assets-cdn.github.com
      
    3. 用拷贝出的文件替换hosts文件;

    4. 刷新DNS缓存:sudo dscacheutil -flushcache

    Windows下:

    1. 用记事本打开hosts文件(路径在:C:\Windows\System32\drivers\etc\hosts)

    2. 将下列内容加入到拷贝出的hosts文件中:

      192.30.253.112 github.com
      151.101.185.194 github.global.ssl.fastly.net
      151.101.184.249 global-ssl.fastly.net
      185.199.111.153 assets-cdn.github.com
      
    3. 刷新DNS缓存:ipconfig /flushdns

    相关文章

      网友评论

          本文标题:git clone 下载速度慢的解决方法

          本文链接:https://www.haomeiwen.com/subject/kolmtctx.html