LoginSignup
2
2

More than 5 years have passed since last update.

heroku コマンドでUnable to verify certificateエラーが出たら

Posted at

新しいマシン(OSX 10.8.3)でgit cloneするために
gem install heroku
(versionは2.39.4だった)

heroku keys:add

上記の流れで発生。

エラーメッセージ

failed
 !    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:   /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/ssl_socket.rb:69:in `connect'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/ssl_socket.rb:69:in `initialize'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/connection.rb:365:in `new'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/connection.rb:365:in `socket'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/connection.rb:105:in `request_call'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/middlewares/mock.rb:42:in `request_call'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/middlewares/base.rb:15:in `request_call'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/middlewares/base.rb:15:in `request_call'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/excon-0.25.1/lib/excon/connection.rb:244:in `request'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-api-0.3.13/lib/heroku/api.rb:76:in `request'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-api-0.3.13/lib/heroku/api/login.rb:9:in `post_login'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/auth.rb:80:in `api_key'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/auth.rb:189:in `ask_for_credentials'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/auth.rb:221:in `ask_for_and_save_credentials'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/auth.rb:84:in `get_credentials'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/auth.rb:74:in `password'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/auth.rb:17:in `api'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/command/base.rb:40:in `api'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/command/keys.rb:105:in `block in clear'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/helpers.rb:236:in `action'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/command/keys.rb:104:in `clear'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/command.rb:206:in `run'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/lib/heroku/cli.rb:28:in `start'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/gems/heroku-2.39.4/bin/heroku:17:in `<top (required)>'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/bin/heroku:19:in `load'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/bin/heroku:19:in `<main>'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
                 /Users/name/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'

    Command:     heroku keys:add
    Version:     heroku-gem/2.39.4 (x86_64-darwin12.3.0) ruby/1.9.3

stackoverflowさんで似たような現象の人がいた。
Heroku client internal error. Unable to verify certificate

というわけで
gem uninstall heroku

https://toolbelt.heroku.com/ 
上記からtoolbeltを手に入れる。

Mac-mini% heroku login

Mac-mini% heroku keys:add
Found existing public key: /Users/name/.ssh/id_rsa.pub
Uploading SSH public key /Users/name/.ssh/id_rsa.pub... done

Mac-mini% git clone git@heroku.com:hoge.git

でうまくいった。
久しぶりにheroku触ったので色々変わったのかな。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2