美文网首页git学习Cocoapods
问题:Failed to connect to github.c

问题:Failed to connect to github.c

作者: 大亮亮亮亮 | 来源:发表于2020-02-15 23:34 被阅读0次
发现问题

项目突然拉不了github的仓库代码。输出Failed to connect to github.com port 443: Operation timed out,梯子也不行。

解决方法

一番操作查看了host文件中github.com的IP,试了一下旧的IP果然访问不了。

1、查询可以用的IP
https://www.ipaddress.com/上分别搜索
github.com、github.global-ssl.fastly.net

2、修改host文件

操作:sudo vi /etc/hosts,替换成以下ip即可

151.101.185.194 github.global-ssl.fastly.net
192.30.253.112  github.com

3、完成
最后可以试试git clone了。

相关文章

网友评论

    本文标题:问题:Failed to connect to github.c

    本文链接:https://www.haomeiwen.com/subject/eayufhtx.html