6

我是 Heroku 的新手。我按照 Heroku 网站上的教程在 Windows 中设置 Heroku。我安装了 Heroku Toolbelt。当我运行 command$ heroku login并输入电子邮件和密码时,我收到以下错误:

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

我输入的电子邮件地址无关紧要,错误仍然相同。

我试过搜索类似的问题,但似乎没有找到解决我问题的解决方案。请帮帮我,非常感谢!!

4

3 回答 3

6

关于这个问题的其他几个参考:

其他人报告的一些解决方案有效:

  1. [sudo] gem install certified

    添加到 gemfile :gem 'certified'

    bundle install

  2. 尝试从https://github.com/stevegraham/certified将 /certs 文件夹添加到您的 /lib 目录

  3. 尝试设置 HEROKU_SSL_VERIFY 以禁用$ HEROKU_SSL_VERIFY=disableheroku 日志

  4. 可能尝试卸载 gem,而是从https://toolbelt.heroku.com下载/安装工具带

于 2013-07-13T21:55:13.153 回答
3

我遇到了同样的问题,没有任何建议对我有用。

事实证明,当我试图解决一个不同的问题时,我设置了一个环境变量来将我的 SSL 证书位置设置为 RailsInstaller 目录。

如果以上答案都没有帮助您,我建议检查任何可疑的环境变量。

于 2013-10-08T10:28:53.540 回答
1

我也有这个问题。以下对我有用:

  1. 下载了工具带并重新安装(即使没有卸载以前的安装)
  2. 跑来heroku login重新建立登录

听起来很简单,它解决了我的证书问题:)

于 2014-03-25T13:37:53.090 回答