为什么我在尝试更新cocoapods时遇到此错误?

时间:2017-05-05 01:38:34

标签: ruby ssl rubygems ssl-certificate cocoapods

我以前遇到过更新cocoapods的SSL问题并修复它我更新了rubygems。但是,我现在有一个新的错误。这就是我所做的和我得到的:

Alexs-MBP:~ alextyshka$ sudo gem install cocoapods Password: ERROR: SSL verification error at depth 2: certificate has expired (10) ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z ERROR: SSL verification error at depth 2: certificate has expired (10) ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z ERROR: SSL verification error at depth 2: certificate has expired (10) ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) ERROR: SSL verification error at depth 2: certificate has expired (10) ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z

我已经在网上阅读了有关过期全局签名证书的各种内容,但我真的不想搞砸Mac上的重要内容。有什么建议吗?

3 个答案:

答案 0 :(得分:2)

按照此处描述的步骤http://guides.rubygems.org/ssl-certificate-update,然后运行以下命令

 sudo rvm osx-ssl-certs update all

答案 1 :(得分:1)

我得到RubyGems没有使用来自http://help.rubygems.org的过期证书。并找到与您ERROR: SSL verification error at depth 2: certificate has expired (10)非常相似的问题,也许会给你一些帮助。

你可以尝试:
 1.如果您看到GlobalSign CA证书已过期(2014年),您需要获取最新的CA根证书:fetch the latest CA root certificate, 请注意,过期的GlobalSign证书在九年前(2007年)更新。如果您遇到此问题,请联系维护您的规范CA证书列表并将其指向上述URL的人员  2.完成以下工作:

- Update ruby gems - http://guides.rubygems.org/ssl-certificate-update/
- Downloaded and installed the new SSL certificate -     http://guides.rubygems.org/ssl-certificate-update/
- Used RVM to update my system SSL certificates - http://railsapps.github.io/openssl-certificate-verify-failed.html 

答案 2 :(得分:0)

我有同样的问题。我什至重新安装了cocoapods。终于,我发现我的宝石资源不再使用了,所以我找到了一个新的宝石资源并更新了宝石资源。

$ gem sources --add new_side --remove old_side

相关问题