6

I am new to Heroku. I followed the tutorials from Heroku website to set up Heroku in Windows. I installed the Heroku Toolbelt. When I run the command $ heroku login, and type in the email and password, I get the following error:

Owner@OWNER-PC ~
$ heroku login
Enter your Heroku credentials.
Email: qwe
Password (typing will be hidden):
 !    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:   C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/ssl_socket.rb:55:in `connect'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/ssl_socket.rb:55:in `initialize'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/connection.rb:367:in `new'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/connection.rb:367:in `socket'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/connection.rb:105:in `request_call'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/middlewares/mock.rb:42:in `request_call'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/middlewares/base.rb:15:in `request_call'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/middlewares/base.rb:15:in `request_call'
             C:/Users/Owner/.heroku/client/vendor/gems/excon-0.22.1/lib/excon/connection.rb:246:in `request'
             C:/Users/Owner/.heroku/client/vendor/gems/heroku-api-0.3.11/lib/heroku/api.rb:76:in `request'
             C:/Users/Owner/.heroku/client/vendor/gems/heroku-api-0.3.11/lib/heroku/api/login.rb:9:in `post_login'
             C:/Users/Owner/.heroku/client/lib/heroku/auth.rb:80:in `api_key'
             C:/Users/Owner/.heroku/client/lib/heroku/auth.rb:189:in `ask_for_credentials'
             C:/Users/Owner/.heroku/client/lib/heroku/auth.rb:221:in `ask_for_and_save_credentials'
             C:/Users/Owner/.heroku/client/lib/heroku/auth.rb:84:in `get_credentials'
             C:/Users/Owner/.heroku/client/lib/heroku/auth.rb:41:in `login'
             C:/Users/Owner/.heroku/client/lib/heroku/command/auth.rb:31:in `login'
             C:/Users/Owner/.heroku/client/lib/heroku/command.rb:206:in `run'
             C:/Users/Owner/.heroku/client/lib/heroku/cli.rb:28:in `start'
             c:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'

Command:     heroku login
Version:     heroku/toolbelt/2.39.4 (i386-mingw32) ruby/1.9.3

It doesn't matter what email address I typed in, the error is still the same.

I've tried searching it for similar issues, but don't seem to find a solution to fix my problem. Please help me, thank you very much!!

Dominic Tancredi
  • 41,134
  • 7
  • 34
  • 50
Terry Chen
  • 427
  • 6
  • 9

3 Answers3

6

Several other references to this issue:

Some solutions that others reported to have worked:

  1. [sudo] gem install certified

    add to gemfile : gem 'certified'

    bundle install

  2. try adding the /certs folder to your /lib directory from https://github.com/stevegraham/certified

  3. Try setting HEROKU_SSL_VERIFY to disable $ HEROKU_SSL_VERIFY=disable heroku logs

  4. Possibly try uninstalling the gem, and instead downloading/installing the toolbelt from https://toolbelt.heroku.com

Community
  • 1
  • 1
Dominic Tancredi
  • 41,134
  • 7
  • 34
  • 50
  • Hi, I did tried everything. I downloaded the toolbelt from Heroku.com. And that's the error i got. – Terry Chen Jul 13 '13 at 22:44
  • $ gem install certified ERROR: Could not find a valid gem 'certified' (>= 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://rubygems.org/latest_specs.4.8.gz) – Terry Chen Jul 15 '13 at 01:07
  • I remember I successfully certified before, but the result was the same – Terry Chen Jul 15 '13 at 01:08
  • Odd, try installing certs on your system here (http://stackoverflow.com/questions/4528101/ssl-connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificat) – Dominic Tancredi Jul 16 '13 at 17:15
  • option 3, set HEROKU_SSL_VERIFY to disable, worked for me. – Emil Sep 14 '15 at 14:16
3

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.

KnownColor
  • 449
  • 5
  • 12
1

I too had this problem. The following worked for me:

  1. downloaded toobelt and re-installed it (even without uninstalling the previous installation)
  2. ran heroku login to re-establish the login

Simple as it may sound, it solved my certificate problem :)

Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359