Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uphttps://rubygems.org/ - SSL_connect B: certificate verify failed #665
Comments
This comment has been minimized.
This comment has been minimized.
bbuck
commented
Oct 2, 2013
|
This issue has also occurred to me when trying to annotate, and several other gems (as a test). It occurred to me earlier today intermittently but is now preventing me from installing any gem. In the meantime downgrading back to v 2.0.3 for now seems to have resolved this issue. |
This comment has been minimized.
This comment has been minimized.
ventsislaf
commented
Oct 2, 2013
|
I had the same problem. It looks like it is related to OpenSSL security certificates. This worked for me (OS X): brew tap raggi/ale
brew install openssl-osx-ca |
This comment has been minimized.
This comment has been minimized.
|
There are two possible causes for this:
Sadly, OpenSSL does not give good diagnostics for why there was a certificate verification failure. It could be either of the above problems. PS: You should not use 2.0.3 as it is vulnerable to CVE-2013-4287 and CVE-2013-4363. Use 2.0.10 instead. |
This comment has been minimized.
This comment has been minimized.
|
Oh, can you check for timeouts? |
This comment has been minimized.
This comment has been minimized.
bbuck
commented
Oct 2, 2013
|
I'm not sure how I would check for timeouts, but I think the issue might be related to ruby I don't think it would be a timeout, at least for me I receive the SSL failure immediately after trying to install a gem - that would be a short timeout. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lephyrius
commented
Oct 3, 2013
|
Im seeing this error:
|
This comment has been minimized.
This comment has been minimized.
lucamug
commented
Oct 5, 2013
|
Same problem here: $ gem install rake --verbose |
This comment has been minimized.
This comment has been minimized.
|
For the ones still getting this error, would you mind perform the following command with
If you can make a gist with the complete output will allow us to verify the certs obtained from the server and then determine what could be the issue. Thank you. |
This comment has been minimized.
This comment has been minimized.
lucamug
commented
Oct 6, 2013
|
Here is the gist: https://gist.github.com/lucamug/6851433 |
This comment has been minimized.
This comment has been minimized.
nmarley
commented
Oct 6, 2013
|
I've been getting this error for a few days now. My latest error message: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/gems/sass-3.2.12.gem) I'm on OSX 10.7.5 with Ruby 2.0.0p247 and the latest version of rubygems:
Here's my gist: https://gist.github.com/nmarley/6858578 |
This comment has been minimized.
This comment has been minimized.
Serfenia
commented
Oct 6, 2013
|
I've been having this issue also since friday (when I tried to install the flickraw gem). It worked before, first I thought might be a network issue but it wasn't since I tried it on different wireless and wired networks. Doing a normal bundle install works, if you set the source insecurely. [edited by @drbrain to remove a broken fix] Doing a gem install, like I need to do a specific bcrypt-ruby install for windows 7, it won't work. |
This comment has been minimized.
This comment has been minimized.
|
@drbrain looking at the certificate issues, seems that the problem is not connecting to rubygems.org and the SSL, but the redirects to Amazon S3 for downloading the gems, which is resulting in the SSL error we are seeing. Perhaps we can add these certificates too? I have a strong feeling this might be the issue. I can't test this right now, but will be able to test something starting on Tuesday |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bbuck
commented
Oct 7, 2013
|
@luislavena A little late, but here it is: https://gist.github.com/bbuck/6c4831f21f53365c72df That's a gist of executing the openssl command you gave. |
This comment has been minimized.
This comment has been minimized.
nmarley
commented
Oct 7, 2013
|
My solution to this was to update my CA certs file for the instance of openssl that Ruby is linked against. Since I linked against a manually-compiled OpenSSL in /opt/openssl, the brew
Then I moved the file to the location specified by:
I'm guessing Amazon updated an SSL cert file about 5 days ago, that or one of the bundled certs that was making this work expired at that time. |
drbrain
closed this
in
71bc866
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
added a commit
that referenced
this issue
Oct 8, 2013
This comment has been minimized.
This comment has been minimized.
collins001
commented
Sep 27, 2015
|
Mine issue is a bit different...
|
This comment has been minimized.
This comment has been minimized.
|
@collins001 what RubyGems version are you using? If ruby is trying to download |
added a commit
to hashdist/hashstack
that referenced
this issue
Oct 5, 2015
This comment has been minimized.
This comment has been minimized.
3686
commented
Apr 27, 2016
•
|
Updating system gems worked for me under bundler: In my Gemfile:
In elevated powershell:
|
This comment has been minimized.
This comment has been minimized.
vtanathip
commented
Oct 8, 2016
|
I still have the problem with gem. this is a fresh install ruby version 2.2.5p319 from http://rubyinstaller.org/
ruby version 2.2.5p319 Have anyone an idea to solve this? |
This comment has been minimized.
This comment has been minimized.
Fire-Dragon-DoL
commented
Oct 11, 2016
|
Having this problem too. Wonder what's the cause. I noticed api.rubygems.org has a "too many redirects" error |
This comment has been minimized.
This comment has been minimized.
RupW
commented
Oct 11, 2016
|
@vtanathip There's a workaround here: http://guides.rubygems.org/ssl-certificate-update/ If you watch it fail in procexp you can see it's also trying to find SSL certs in a folder under C;\Users\Justin, so this probably does work for whoever builds the Windows releases at rubyinstaller.org. |
This comment has been minimized.
This comment has been minimized.
vtanathip
commented
Oct 11, 2016
|
@RupW Thanks, that's help!!! Have to say that document resolved my issues. Hope someone that have the same problem will resolve it. FYI: I use MANUAL SOLUTION TO SSL ISSUE |
This comment has been minimized.
This comment has been minimized.
Fire-Dragon-DoL
commented
Oct 11, 2016
|
I fixed mine by manually installing rubygems and upgrading openssl on osx yosemite |
This comment has been minimized.
This comment has been minimized.
rishifactual
commented
Oct 12, 2016
|
Neither @RupW or @Fire-Dragon-DoL 's suggestions worked for me (OSX Yosemite 10.10.5). RubyGems version 2.6.7. Still getting the same error message. Does anyone have other suggestions? |
This comment has been minimized.
This comment has been minimized.
Fire-Dragon-DoL
commented
Oct 12, 2016
|
@rishifactual As someone pointed out, it's a problem with RVM rubies, they are built with old openssl. Update openssl, reinstall your ruby with |
This comment has been minimized.
This comment has been minimized.
rishifactual
commented
Oct 12, 2016
|
perfect! Thanks |
This comment has been minimized.
This comment has been minimized.
Fire-Dragon-DoL
commented
Oct 12, 2016
Fire-Dragon-DoL
referenced this issue
Oct 12, 2016
Closed
Rubies compiled with old versions of openssl break rubygems #3779
This comment has been minimized.
This comment has been minimized.
jrvaghela72
commented
Oct 20, 2016
•
|
[REDACTED due to creating a security vulnerability] |
This comment has been minimized.
This comment has been minimized.
Fire-Dragon-DoL
commented
Oct 20, 2016
|
That's not a solution, you are trading security (a big one) if you use |
This comment has been minimized.
This comment has been minimized.
|
@Fire-Dragon-DoL I redacted it here and flagged it on stack overflow |
This comment has been minimized.
This comment has been minimized.
officialmmt
commented
Oct 25, 2016
•
|
Fix is here |
This comment has been minimized.
This comment has been minimized.
Fire-Dragon-DoL
commented
Oct 25, 2016
|
@officialmmt nope, I applied that fix and didn't work, the only fix currently was recompiling the rubies |
This comment has been minimized.
This comment has been minimized.
trajano
commented
Oct 28, 2016
|
@officialmmt slight alteration for your instructions. I copied the global.pem then I made sure I remove all sources using
Finally I added back rubygems.org
|
This comment has been minimized.
This comment has been minimized.
gabeodess
commented
Nov 4, 2016
|
I had to reinstall openssl:
|
This comment has been minimized.
This comment has been minimized.
felixfbecker
commented
Nov 14, 2016
|
I am still getting this error with a fresh install on windows |
This comment has been minimized.
This comment has been minimized.
vnluc
commented
Nov 16, 2016
|
I got this error also. The cause is gem is updated and also the certificates. Please follow this guide to update gem & the certificates, it helped me out. |
This comment has been minimized.
This comment has been minimized.
vchinthakunta
commented
Nov 18, 2016
•
|
This solution did not work for me..If you are facing the same.. try the steps from [REDACTED, advocates insecure connections] |
This comment has been minimized.
This comment has been minimized.
vnluc
commented
Nov 28, 2016
•
|
@omidheshmatinia: This is in secure way, better follow my way if it works. Or @ccoenen is ok also. |
This comment has been minimized.
This comment has been minimized.
ccoenen
commented
Nov 28, 2016
•
|
(Edit: the link to the insecure answer was removed, the following is no longer relevant to this discussion, it is referring to the VERIFY_NONE pattern which is a bad idea but which is nonetheless often suggested)
|
This comment has been minimized.
This comment has been minimized.
fguillen
commented
Jan 20, 2018
|
In my case:
Updating Ruby to 2.4.2 made the trick. |
This comment has been minimized.
This comment has been minimized.
samiggapps
commented
Aug 9, 2018
|
This worked for me https://gist.github.com/fnichol/867550 |

emeyekayee commentedOct 2, 2013
gem install pry
ERROR: Could not find a valid gem 'pry' (>= 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://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)