使用工具查看 Github 域名对应的 IP 映射
推荐使用 DNS查询工具 如下图所示:
分别查出以下域名对应的 IP 映射并记录
- github.com
- github.github.io
- assets-cdn.github.com
- github.global.ssl.fastly.net
设置 Host
- window 位置:C:\Windows\System32\drivers\etc\hosts
- Mac 位置:/etc/hosts
20.205.243.166 github.com
185.199.108.153 github.github.io
185.199.111.153 assets-cdn.github.com
208.101.21.43 github.global.ssl.fastly.net
然后就可以愉快地克隆啦
git clone https://github.com/xxx/xxx.git ./xxx