github下载提速教程

知识共享许可协议 版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (Creative Commons

获取github的IP地址

访问:https://www.ipaddress.com/ 网址 依次获取以下三个网址的IP

  1. github.com
  2. github.global.ssl.fastly.net
  3. codeload.github.com

在这里插入图片描述

这是我获取的IP

192.30.253.113  github.com
151.101.25.194 github.global.ssl.fastly.net
192.30.253.121 codeload.github.com

  
  

修改系统hosts

添加内容

192.30.253.113  github.com
151.101.25.194 github.global.ssl.fastly.net
192.30.253.121 codeload.github.com

  
  

windows系统

  1. hosts文件路径:C:\Windows\System32\drivers\etc\hosts ,
  2. 添加上面查询到的IP到hosts文件中(此时可能需要管理员权限,可以将hosts复制到桌面,修改好了再复制回去覆盖原先的)
  3. 结果:
    在这里插入图片描述
  4. 刷新DNS
 ipconfig /flushdns

   
   

linux系统

  1. 打开hosts文件并修改
sudo vim /etc/hosts

  
  

插入ip映射保存退出
结果:
在这里插入图片描述

2.重启网络服务

sudo /etc/init.d/networking restart

  
  

附上一张效果图
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_44621510/article/details/95251993
今日推荐