Heroku客户端内部错误。无法验证证书。

10

Heroku使用的密钥、运行rake等功能似乎存在问题,有其他人遇到此问题吗?或者知道如何避免吗? 谢谢!

Trace-- !Heroku客户端内部错误。 !寻求帮助: https://help.heroku.com !或在此处报告错误: 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
7个回答

10

在终端中运行“heroku update”解决了我的问题。


这对我也解决了问题。比起重命名文件等操作,我更愿意这样做。 - backdesk

5

当我安装heroku gem的版本是2.39.4时,Mac OS X曾经出现过此问题。我将其卸载并重新让Heroku toolbelt成为我的heroku可执行文件的提供者,虽然我不得不再次进行“heroku auth:login”和“heroku keys:add”,但现在它可以正常工作。

注意,当然,在我的Vagrant Heroku Ubuntu虚拟机上仍然需要heroku gem。


5

需要手动删除openssl.cnf文件...在您的计算机上查找该文件并将其重命名为其他名称....最新的excon版本中存在错误....


1
我在mingw32文件夹中删除了openssl.cnf,然后一切都开始正常工作了。 - zbstof

2

我尝试删除openssl.conf文件,但无法解决问题。

不过,我安装了heroku工具包并删除了所有旧版本的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.

1

我遇到了同样的问题,按照user2515011建议,将我的机器上的openssl.cnf文件重命名,这样就解决了。

老实说,我不知道为什么这样做可以解决问题,或者是否会使我在其他方面变得脆弱。有人能解释一下吗?


0

我曾经遇到了同样的问题,但是所有的建议都不能解决我的问题。

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

如果以上建议都不能帮助您,请检查是否存在任何可疑的环境变量。


0

很遗憾,我无法在我的MacBook Air上复制这个问题。我想知道它是否与rvm有关。你使用的是哪个版本?看起来它曾经打包了openssl: https://rvm.io/packages/openssl (但可能不再需要,并且至少在我的机器上使用打包版本效果很好)。你可以尝试按照那个页面的建议运行rvm autolibs enable,然后再试一次吗?


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接