What I did sudo gem install cocoapods
This is the full message from terminal
ERROR: You must add /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2 to your local trusted store
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - hostname "rubygems.org" does not match the server certificate (https://rubygems.org/specs.4.8.gz)
ERROR: SSL verification error at depth 0: unable to get local issuer certificate (20)
I have no experience with SSL but I followed a couple of question similar to mine but no luck
What I've tried:
MichaelHuelsen has the correct answer. Here I will give my step-by-step instructions that worked for me but overwrites the pem file with a large one, so beware if this has sensitive info you might want to not destroy.
$ ruby -ropenssl -e 'p OpenSSL::X509::DEFAULT_CERT_FILE'
"/etc/pki/tls/cert.pem"
Tells me where my cert file is.
cp /etc/pki/tls/cert.pem /tmp/cert.pem.bak
See: https://curl.se/docs/caextract.html
curl --remote-name --time-cond cacert.pem https://curl.se/ca/cacert.pem
mv cacert.pem /etc/pki/tls/cert.pem
I then ran gem update --system to update things, but you may just be ok running your original gem command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With