user2515011
user2515011

Reputation: 127

Heroku client internal error. Unable to verify certificate

Heroku keys, heroku run rake etc seem to be having issues Anyone else having this issue? / know how to get around it ? Thanks !

Trace-- ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or `Excon.defaults[:ssl_verify_peer] = false` (less secure). (Excon::Errors::SocketError)
Backtrace:   /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/ssl_socket.rb:69:in `connect'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/ssl_socket.rb:69:in `initialize'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/connection.rb:365:in `new'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/connection.rb:365:in `socket'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/connection.rb:105:in `request_call'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/middlewares/mock.rb:42:in `request_call'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/middlewares/base.rb:15:in `request_call'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/middlewares/base.rb:15:in `request_call'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/excon-0.25.0/lib/excon/connection.rb:244:in `request'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-api-0.3.13/lib/heroku/api.rb:76:in `request'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-api-0.3.13/lib/heroku/api/login.rb:9:in `post_login'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/auth.rb:80:in `api_key'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/auth.rb:189:in `ask_for_credentials'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/auth.rb:221:in `ask_for_and_save_credentials'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/auth.rb:84:in `get_credentials'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/auth.rb:74:in `password'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/auth.rb:17:in `api'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/command/base.rb:40:in `api'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/command/keys.rb:27:in `index'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/command.rb:206:in `run'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/lib/heroku/cli.rb:28:in `start'
             /usr/local/rvm/gems/ruby-1.9.3-p194/gems/heroku-2.39.4/bin/heroku:17:in `<top (required)>'
             /usr/local/rvm/gems/ruby-1.9.3-p194/bin/heroku:19:in `load'
             /usr/local/rvm/gems/ruby-1.9.3-p194/bin/heroku:19:in `<main>'
             /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
             /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

Command:     heroku keys
Version:     heroku-gem/2.39.4 (x86_64-darwin11.4.0) ruby/1.9.3

Upvotes: 10

Views: 6678

Answers (7)

Julian
Julian

Reputation: 145

Running 'heroku update' in terminal fixed this for me.

Upvotes: 10

KnownColor
KnownColor

Reputation: 449

I was having this same problem and none of the suggestions were working for me.

It turns out when trying to fix a different problem I had set an environment variable to set my SSL Certificate location to be in the RailsInstaller directory.

I recommend checking for any suspicious environment variables if none of the above answers are helping you.

Upvotes: 0

johnnygoodman
johnnygoodman

Reputation: 475

I was unable to fix this by deleting openssl.conf.

However, I was able to fix this by installing the heroku toolbelt and then deleting ALL old installations of the heroku gem.

macbook:~ johnnygoodman$ gem uninstall heroku

Select gem to uninstall:
 1. heroku-2.35.0
 2. heroku-2.39.4
 3. All versions
> 3
Successfully uninstalled heroku-2.35.0
Remove executables:
    heroku

macbook:~ johnnygoodman$ heroku login
Enter your Heroku credentials.
Email: 
Password (typing will be hidden):
Authentication successful.

Upvotes: 2

geemus
geemus

Reputation: 2542

Unfortunately I'm unable to duplicate this on my macbook air. I wonder if perhaps it relates to rvm. What version are you using? It looks as though it used to package openssl: https://rvm.io/packages/openssl (but probably shouldn't any longer, and at least on my machine using the packaged versions works well). Could you try following the advice from that page and running rvm autolibs enable and trying again?

Upvotes: 0

Benji Lanyado
Benji Lanyado

Reputation: 239

I had the same problem, and renamed the openssl.cnf file on my machine, as user2515011 recommends above, and it's worked.

To be honest, I don't know why this has worked, or if it has left me vulnerable elsewhere. Can anyone explain?

Upvotes: 1

user2515011
user2515011

Reputation: 127

Need to manually delete openssl.cnf... find the file on your machine and rename it to something else.... bug in the latest excon release....

Upvotes: 5

Al Chou
Al Chou

Reputation: 457

I had this problem briefly on Mac OS X when I had version 2.39.4 of the heroku gem installed. I uninstalled it and allowed the Heroku toolbelt to be the provider of my heroku executable again, and although I had to go through "heroku auth:login" and "heroku keys:add " again, it now works as expected.

N.B. The heroku gem is still required on my Vagrant Heroku Ubuntu VM, of course.

Upvotes: 5

Related Questions