-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
certificate verify failed (Faraday::SSLError) #253
Comments
See #235 for a workaround. The cert bundle in this library has the correct roots. Setting an env variable will have signet pick it up. I'll take a look at cleaning up signet so it picks up the correct roots by default next week. |
I was getting this issue on my Mac too. |
@sqrrrl I think this issue can be closed now as it can be fixed by updating |
@sqrrrl Updating |
FWIW, this is what worked for me: cert_path = Gem.loaded_specs['google-api-client'].full_gem_path+'/lib/cacerts.pem' |
Worth linking: rvm/rvm#3330 |
Thanks crypticsymbols! That worked for me as well on:
|
@crypticsymbols thanks a lot, that works for me too! |
It's far better not to touch any code and fix the damn OS X's ruby 2.2.1 binary. |
I agree with @Vanuan, code was just a stopgap measure and the other approach is better. |
@Vanuan it does not worked for me |
Here is what worked for me: I'm running OS X 10.11.1, Ruby 2.2.1, openssl 1.0.2d_1 Upgrading to Ruby 2.2.3 fixed the problem. |
A system wide solution would be this (for Yosemite and Ruby 2.2.1): Downloading this http://curl.haxx.se/ca/cacert.pem, and saving it replacing RVM and ruby seems to have an outdated CA cert. |
@dblommesteijn thank, works for me |
@stevestofiel went with your fix thanks! i'm running stock: ruby 2.2.1p85. |
@dblommesteijn Thanks, this solution worked for me. :) |
Just in case anyone still facing issue.. upgrading to Ruby 2.3.0 helped me. (was in 2.2.3) |
Same issues here that everyone else went through. I'm on El Capitan 10.11 and using version ruby 2.2.0 Tried the cert.pem replacement What worked for me: |
like @flyfy1 upgrading to Ruby 2.3.0 fixed the issue for me as well |
upgrading ruby to 2.3.0 solved it for me as well |
With rvm (with Ruby 2.2.3 installed), on OS X, what fixed it for me was: rvm requirements |
@schanami helped me rvm reinstall 2.2.2 --disable-binary thx |
The solution for me on OS X 10.11.4, Ruby 2.1.2 was running To clarify, none of the following solved the issue:
|
Because pre-build version doesn't distinguish between different OS X versions (has wrong paths hardcoded). Newer OS X has a different SSL subsystem. |
Nice explanation given here : https://toadle.me/2015/04/16/fixing-failing-ssl-verification-with-rvm.html |
What worked for me with the error was:
none of the commands higher up this thread worked for some reason. |
@nchodelski thanks! this also worked for me on |
RVM > 1.9.1 comes with the method for updating certificates: credits: http://railsapps.github.io/openssl-certificate-verify-failed.html |
@fenec this does not always solve the issue. I've given up fixing rvm and have switched to rbenv. |
I had some issues with this too. When i re installed a different version of I wish i knew what version to install to fix both errors at the same time. On 22 June 2016 at 08:07, Dennis Blommesteijn notifications@github.com
|
I fix the error with |
Thanks @zegomesjf! |
I'm not using |
I have used in this way and it worked for me. |
Thank you @sony-mathew-fd. The solution pointed by you (https://toadle.me/2015/04/16/fixing-failing-ssl-verification-with-rvm.html) helped a lot. What I had to do:
I encountered this problem while I was using |
Confirmed this problem with jruby 9.1.13.0 |
FWIW switching to a different (open) wifi network may help. I'm no expert in networking/certificates but I recently ran into the same issue when I was trying to hit a Ruby backend with an OAuth callback. My environment was fine (macOS Sierra 10.12.6 + Docker Ruby 2.3.1 base image) and my local certificates were alright but the secured network I was on was modifying certificates to make it unfriendly for the Ruby app. Just wanted to mention in case someone exhausted all the local options like me and was still getting: |
OSX 10.10.3, Ruby 2.2.1p85, gem version 0.9.pre1
Full error:
/Users/username/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in
'connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Faraday::SSLError) from /Users/asmith/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in
block in connect'from /Users/asmith/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in
timeout' from /Users/asmith/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in
connect'from /Users/asmith/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:863:in
do_start' from /Users/asmith/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:852:in
start'from /Users/asmith/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1375:in
request' from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:82:in
perform_request'from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:40:in
block in call' from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:87:in
with_net_http_connection'from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:32:in
call' from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/faraday-0.9.1/lib/faraday/request/url_encoded.rb:15:in
call'from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/signet-0.6.1/lib/signet/oauth_2/client.rb:957:in
fetch_access_token' from /Users/asmith/.rvm/gems/ruby-2.2.1/gems/signet-0.6.1/lib/signet/oauth_2/client.rb:983:in
fetch_access_token!'from run.rb:17:in `
I am able to hotwire with this at the top:
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
...but that kinda sucks.
The text was updated successfully, but these errors were encountered: