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
Running 'heroku update' in terminal fixed this for me.
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.
Need to manually delete openssl.cnf... find the file on your machine and rename it to something else.... bug in the latest excon release....
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.
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?
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?
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.
Related
My system is windows7.
I have opened a Heroku account,
installed Git,
created a SSH key,
and now I need to create a place on Heroku server to deploy apps.
But when I type
$ heroku create
I get the following error message:
Creating fast-reaches-6714... done, stack is cedar
http://fast-reaches-6714.herokuapp.com/ | git#heroku.com:fast-reaches-6714.git
! 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: No such file or directory - git --version (Errno::ENOENT)
Backtrace: C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/helpers.rb:103:in ``'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/helpers.rb:103:in `has_git?'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/helpers.rb:108:in `git'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/helpers.rb:156:in `create_git_remote'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/command/apps.rb:278:in `create'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/command.rb:218:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/lib/heroku/cli.rb:28:in `start'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.2.1/bin/heroku:17:in `<top (required)>'
C:/Ruby193/bin/heroku:23:in `load'
C:/Ruby193/bin/heroku:23:in `<main>'
Command: heroku create
Version: heroku-gem/3.2.1 (i386-mingw32) ruby/1.9.3
I looked at help.heroku.com but could not find answers..
What seems to be the problem(s)?
Any help is appreciated
It looks like git isn't on your path, because you just installed it. Restart your terminal and then it should be on your path.
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!!
Several other references to this issue:
Heroku client internal error. Unable to verify certificate
https://github.com/heroku/heroku/issues/245
Some solutions that others reported to have worked:
[sudo] gem install certified
add to gemfile : gem 'certified'
bundle install
try adding the /certs folder to your /lib directory from https://github.com/stevegraham/certified
Try setting HEROKU_SSL_VERIFY to disable $ HEROKU_SSL_VERIFY=disable heroku logs
Possibly try uninstalling the gem, and instead downloading/installing the toolbelt from https://toolbelt.heroku.com
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.
I too had this problem. The following worked for me:
downloaded toobelt and re-installed it (even without uninstalling the previous installation)
ran heroku login to re-establish the login
Simple as it may sound, it solved my certificate problem :)
I tried to run a heroku console for a Rails 3.2 app using
heroku run bundle exec rails console
a command which has previously worked. It gave me the error message below. I also tried to run
heroku info
and got a similar error message. I did this both before and after signing in with the heroku toolbelt, same result. I also tried this on another website and got the same result. Both websites are actually working, just can't access the console
Can anyone explain what the problem might be.
! Heroku client internal error.
Error: No such file or directory - git --version (Errno::ENOENT)
Backtrace: /usr/local/heroku/lib/heroku/helpers.rb:103:in ``'
/usr/local/heroku/lib/heroku/helpers.rb:103:in `has_git?'
/usr/local/heroku/lib/heroku/helpers.rb:108:in `git'
/usr/local/heroku/lib/heroku/command/base.rb:206:in `git_remotes'
/usr/local/heroku/lib/heroku/command/base.rb:179:in `extract_app_in_dir'
/usr/local/heroku/lib/heroku/command/base.rb:31:in `app'
/usr/local/heroku/lib/heroku/command/run.rb:108:in `block in run_attached'
/usr/local/heroku/lib/heroku/helpers.rb:236:in `action'
/usr/local/heroku/lib/heroku/command/run.rb:107:in `run_attached'
/usr/local/heroku/lib/heroku/command/run.rb:21:in `index'
/usr/local/heroku/lib/heroku/command.rb:206:in `run'
/usr/local/heroku/lib/heroku/cli.rb:28:in `start'
/usr/bin/heroku:24:in `<main>'
Command: heroku run bundle exec rails console
Version: heroku-toolbelt/2.33.2 (x86_64-darwin10.8.0) ruby/1.9.3
This problem resulted from the installation of Mountain Lion on my Mac. To fix it, I had to open XCode preferences and to install the command line tools in the downloads folder.
I'm a beginner on Ruby on Rails, Git and Heroku. I am following the Rails Tutorial behind a corporate proxy. So far I am able to install RailsInstaller that helped me set up Ruby, Rails, and Git (also GitHub) rather smoothly. But I am really stuck on the section (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:1.4.1), where I am trying to link my public key to my new Heroku account to push the repository to Heroku.
I am on a Windows 7 box behind a corp proxy. I have my HTTP_PROXY env variable set up and it is working for my push to GitHub. I'm not able to get past the following error. It does not seem to get to the point of complaining about ssh public key and the other posts here about heroku keys:add errors have different output.. And I haven't located relevant info at help.heroku.com. Any insights would be greatly appreciated!
c:\Sites\testproj\thirdapp>heroku keys:add
Enter your Heroku credentials.
Email: my.email#gmail.com
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: A non-blocking socket operation could not be completed immediately. (Excon::Errors::SocketError)
Backtrace: C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl/buffering.rb:53:in `sysread'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl/buffering.rb:53:in `sysread'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl/buffering.rb:53:in `fill_rbuff'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl/buffering.rb:293:in `eof?'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl/buffering.rb:246:in `readline'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/excon-0.14.0/lib/excon/ssl_socket.rb:68:in `initialize'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/excon-0.14.0/lib/excon/connection.rb:330:in `new'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/excon-0.14.0/lib/excon/connection.rb:330:in `socket'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/excon-0.14.0/lib/excon/connection.rb:175:in `request_kernel'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/excon-0.14.0/lib/excon/connection.rb:101:in `request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-api-0.2.5/lib/heroku/api.rb:60:in `request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-api-0.2.5/lib/heroku/api/login.rb:9:in `post_login'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/auth.rb:74:in `api_key'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/auth.rb:183:in `ask_for_credentials'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/auth.rb:214:in `ask_for_and_save_credentials'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/auth.rb:78:in `get_credentials'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/command/keys.rb:66:in `add'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/command.rb:176:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/lib/heroku/cli.rb:10:in `start'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.27.1/bin/heroku:16:in `<top (required)>'
C:/RailsInstaller/Ruby1.9.3/bin/heroku:19:in `load'
C:/RailsInstaller/Ruby1.9.3/bin/heroku:19:in `<main>'
Command: heroku keys:add
Version: heroku-gem/2.27.1 (i386-mingw32) ruby/1.9.3
I am also getting the same error. I uninstall it and install the lattest version of Heroku from Toolbelt and get resolved....
A similar issue has been raised in:
https://github.com/heroku/heroku/issues/441
I'm also getting the same error when calling "heroku keys:add".
Unfortunately, still haven't found any workarounds when working behind proxies.
According to the issue, the command works when NOT behind a proxy.
Has anyone out there seen this error before? I haven't been able to find any reference to SUPPORTED_TYPE in the source...
irb(main):013:0> connection = Net::SSH.start('host', 'user', :password => 'password')
NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:117:in `keys_for'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:105:in `each_line'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:105:in `keys_for'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:103:in `open'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:103:in `keys_for'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:33:in `search_in'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:33:in `map'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:33:in `search_in'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:27:in `search_for'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/algorithms.rb:237:in `prepare_preferred_algorithms!'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/algorithms.rb:120:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/session.rb:79:in `new'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/session.rb:79:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh.rb:186:in `new'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh.rb:186:in `start'
from (irb):13
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1313
The easier solution is to use this forked version of net-ssh which fixes that issue (the next release of the official net-ssh gem should fix it as well) as described here.
If you have that issue while deploying through capistrano (which I had today), you can install this net-ssh version from github through the Gemfile and then call cap by using bundle exec cap deploy.
Put in the Gemfile gem 'net-ssh', :git => 'git://github.com/nessche/net-ssh.git'.
This is a problem that seems to have been introduced by the May 24th updates 2.5.0 or 2.5.1 to the net-ssh gem. You can find the constant SUPPORTED_TYPE here:
http://net-ssh.github.com/net-ssh/classes/Net/SSH/KnownHosts.html
I don't know all the details, but there have been a couple solutions to this issue so far. One is to remove your known_hosts file (or the particular host you're trying to connect to from that file), and you might be able to connect until that host is added to known_hosts again -- it will return the same error if it's in there, for some reason.
The second option I've found is to revert to version 2.4.0 of the gem. I've submitted a ticket for the issue at:
http://net-ssh.lighthouseapp.com/projects/36253-net-ssh/tickets/58-nameerror-uninitialized-constant-netsshknownhostssupported_type
Hope it helps!
EDIT: Clarif's solution to this looks like a more acceptable one. Thanks, Clarif!
After following the issues on github and also applying what clarif suggested, I came up with this that fixed my problem.
http://tinyurl.com/cxr2xa3