使用CocoaPods添加第三方库的时候报错
error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)
错误:无法打开到raw.githubusercontent.com的TCP连接:443(连接被拒绝-为“raw.githubusercontent.com”端口443连接(2))
大概是这样如图:

解决方法:
1、前往文件夹,/private/etc 的目录下,找到hosts文件;

2、把hosts文件copy一份到桌面,打开,删除包括 github 的行,保存关闭,然后把桌面这个改过的文件拖到原来的文件夹里,替换原来的

3、没了,重新输入pod命令行即可。

网友评论