最近升级cocoapods中发现在更新ruby镜像源的时候遇见ssl证书链接错误的情况,
https://gems.ruby-china.org/已经访问不了,需要替换新的镜像
首先将查看自己的镜像
gem sources -l
再讲之前的镜像删除
//我自己电脑上是https://gems.ruby-china.org/,所以删除该镜像
gem sources --remove https://gems.ruby-china.org/
然后添加新的镜像
gem sources --add https://gems.ruby-china.com/
这个时候开始报错ssl证书错误
ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR: You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store
Error fetching https://gems.ruby-china.com/:
SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://gems.ruby-china.com/specs.4.8.gz)
这时候需要检查自己的OpenSSL正式是否过期
rvm osx-ssl-certs
效果:Certificates for ~/Documents