Mac安装home-brew报错:
终端提示 no alternative certificate subject name matches target host name 'raw.githubusercontent.com',
进入host编辑页面发现:对应的raw.githubusercontent.com地址是错误的,所以被墙了,通过链接查询:https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
修改为对应的IP地址即可
修改host步骤
- 1.在终端中 sudo vi /etc/hosts 打开编辑文件
- 2.按 s 进入编辑模式
- 3.接着在最下面添加 xxx.xxx.xxx.xxx github.com
- 4.按 control + c 保存
- 5.输入 :wq 退出
查询GitHub 链接
ps:因为系统更新,cocoapods的repo也需要更新,于是导致用不了,后面重装也是出现这个问题,现在都可以了
参考链接:https://www.ioiox.com/archives/62.html
网友评论