安装fastlane的时候报错:
XML/HTML代码
- ERROR: SSL verification error at depth 0: ok (0)
- ERROR: SSL verification error at depth 0: ok (0)
- ERROR: SSL verification error at depth 0: ok (0)
- ERROR: Could not find a valid gem 'rvm' (>= 0), here is why:
- Unable to download data from https://ruby.taobao.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (certificate rejected) (https://ruby.taobao.org/specs.4.8.gz)
- ERROR: SSL verification error at depth 0: ok (0)
- ERROR: SSL verification error at depth 0: ok (0)
网上很多解决方法,什么重建 pem,之类的,或者临时关闭验证:【http.verify_mode = OpenSSL::SSL::VERIFY_NONE】,但更多人都推荐一句话的命令:rvm osx-ssl-certs update all。然而我运行下来却是:
XML/HTML代码
- Selected SSL certs for: curl
- cURL certificate bundle curl is /usr/share/curl/curl-ca-bundle.crt not found
嗯,这回又是一堆人遇到了同样的问题,看看这个高票答案,居然只是说rvm用stable版?
XML/HTML代码
- $ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled
不过也有人有不同的看法:
XML/HTML代码
- To find the location of this file use:
- $ curl-config --ca
- /usr/share/curl/curl-ca-bundle.crt
- Backup your curl-ca-bundle.crt file:
- $ cp /usr/share/curl/curl-ca-bundle.crt /usr/share/curl/curl-ca-bundle.crt.old
- Then you want to concatenate the two file using:
- $ cat cacert.pem /usr/share/curl/curl-ca-bundle.crt >> curl-ca-bundle-new.crt
看起来倒是可行。
参考 :
1、https://blog.engineyard.com/ruby-ssl-error-certificate-verify-failed
2、https://stackoverflow.com/questions/6414232/curl-certificate-error-when-using-rvm-to-install-ruby-1-9-2/6917309