赞
踩
使用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
2. 重启网络和服务器
- # 重启网络
- sudo /etc/init.d/network-manager restart
-
- # 重启机器
- sudo reboot
完成啦~
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/476677
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。