其实 git clone 或者 git push 特别慢,并不是因为 http://github.com 的这个域名被限制了。而是 http://github.global.ssl.fastly.Net 这个域名被限制了。那么首先查到这个域名的ip,然后在hosts文件中进行 ip -> 域名 映射就可以了。

  • 1. 修改本地hosts文件

windows系统的hosts文件的位置如下:C:\Windows\System32\drivers\etc\hosts

mac/linux系统的hosts文件的位置如下:/etc/hosts

  • 2. 增加github.global.ssl.fastly.net和github.com的映射

获取Github相关网站的ip

访问 https://www.ipaddress.com,拉下来,找到页面中下方的 IP Address Tools – Quick Links

分别输入 github.global.ssl.fastly.net 和 github.com,查询ip地址

151.101.113.194 github.global.ssl.fastly.net
192.30.253.112 github.com

 

相关文章:

  • 2021-07-27
  • 2021-09-26
  • 2021-09-26
  • 2021-08-06
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2021-09-10
  • 2021-12-14
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
相关资源
相似解决方案