解决腾讯云轻量服务器国内机器无法使用Github
报错如下:
[root@VM-4-7-centos leshared.com]# git push -u origin master
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决思路:修改Host
https://www.ipaddress.com/
利用上面的网站查询github.com和raw.githubusercontent.com的DNS解析的IP地址
最后,修改服务器的/etc/hosts
添加如下两行:
140.82.112.4 github.com
185.199.108.133 raw.githubusercontent.com
这是最新的IP地址,如果更改之后还无法git clone的话,可能IP地址又更新了,需要查询一下最新的地址
转自:https://blog.csdn.net/weixin_43456810/article/details/118064178
© 版权声明
本站所有文章,如无特殊说明或标注,均为本站原创发布。如需转载,请注明出处。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
THE END
请登录后查看评论内容