0


解决Linux系统git clone失败或超时问题

使用git clone常常不成功,以下是解决办法,亲测有效

  1. 修改hosts

首先使用 sudo vim /etc/hosts 进入hosts,此时是查看模式

按下 i 进入编辑模式,此时需要插入两个IP地址

使用 https://www.ipaddress.com/ 查找两个地址:

github.com
github.global.ssl.fastly.net

然后将地址和名字粘贴进hosts文件中:

140.82.11.4 github.com
151.101.193.194 github.global.ssl.fastly.net 
  1. 重启网络和服务器
# 重启网络
sudo /etc/init.d/network-manager restart

# 重启机器
sudo reboot

完成啦~

🔥🔥🔥更多知识,欢迎访问我的个人博客:Nan-ying's Blog

标签: linux git 运维

本文转载自: https://blog.csdn.net/weixin_42771853/article/details/133135301
版权归原作者 CodeNect 所有, 如有侵权,请联系我们删除。

“解决Linux系统git clone失败或超时问题”的评论:

还没有评论