1

I am doing the Hartle Ruby on Rails Tutorial and this is my first time pushing a project to heroku and I'm trying to figure out what's going wrong..

$ heroku login
email
password
Could not find an existing public key 
Would you like to generate one? [y/n] <--- I hit enter which gave me..
Generating new SSH public key.
Uploading SSH public key /Users/myname/.ssh/id_rsa.pub... done
Authentication successful.

After that I go to the next command, heroku create, because I am already in the directory I want, "first_app"

$ heroku create
Creating immense-savannah-2464... done, stack is cedar
http://immense-savannah-2464.herokuapp.com/ | git@heroku.com:immense-savannah-2464.git  <--- this is not what Hartl gets in his tutorial so I don't know if this looks right or wrong.

After that I then try and push my project to heroku:

$ git push heroku master
The authenticity of host 'heroku.com (XX.XX.XX.XXX)' can't be established.
RSA key fingerprint is Xb:XX:Xe:XX:Xe:cX:XX:XX:XX:fX:XX:Xc:Xf:cX:XX:ad.
Are you sure you want to continue connecting (yes/no)? <--- I always hit "no" because I don't know if I should hit "yes." After I hit "no" it tells me that the host key verification failed!

Any idea what I'm doing wrong? I'm stuck - any help would be much appreciated!

mind.blank
  • 4,820
  • 3
  • 22
  • 49
  • This worked for me: http://stackoverflow.com/questions/4269922/permission-denied-publickey-when-deploying-heroku-code-fatal-the-remote-end – bookcasey Apr 19 '13 at 02:37

1 Answers1

0

Have you already gone through all the steps listed here?
You need to create a public/private key pair to deploy code to Heroku.

That post walks you through all the steps.

I found this answer that might help you. Try changing the project name in [remote "heroku"] to the name given by heroku in .git/config

Update

I just had exactly the same problem. I typed yes when it asked Are you sure you want to continue connecting (yes/no)?, then it still wouldn't connect and returned fatal: The remote end hung up unexpectedly.

I then ran ssh-keygen -t rsa, hit enter a few times and it worked.

This problem came up since I copied my Rails folder to a new computer. The rest of the heroku commands worked, only pushing didn't.

Community
  • 1
  • 1
mind.blank
  • 4,820
  • 3
  • 22
  • 49
  • I have not! Would I get a different result than when I first generated a public key (look at the top under "heroku login")? – user2280826 Apr 16 '13 at 01:41
  • You need a public **and** private key in order to deploy. I would go through the steps and then see what happens. – mind.blank Apr 16 '13 at 01:43
  • Appreciate the heads up. I'll give that a try and see what happens. – user2280826 Apr 16 '13 at 01:45
  • Just tried the link you sent and generated a public key like it said at the top (not sure where/how I can create a private key) and then tried the heroku login, heroku create, and git push heroku master commands. When I got to the "git push heroku master" command I got the same answer as I initially wrote above... Is it that I need a private key or need to hit "yes" to the "continue connecting" question above? Or something else..? – user2280826 Apr 16 '13 at 01:54
  • Look at my updated answer, also this might help https://devcenter.heroku.com/articles/git-repository-ssh-fingerprints – mind.blank Apr 16 '13 at 02:10
  • Gotcha - just looked at the link you posted here and I guess I'm trying to figure out how to manually match the SSH key to the fingerprint so that I end up getting: $ git push heroku master > The authenticity of host 'heroku.com (50.19.85.132)' can't be established. > RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad. > Matching host key fingerprint found in DNS. > Are you sure you want to continue connecting (yes/no)? – user2280826 Apr 16 '13 at 02:21
  • Once I get "Matching host key fingerprint found in DNS" I think I should be good. That's the one line I'm missing in my initial post at the top! Just need to figure out how to actually match it.. – user2280826 Apr 16 '13 at 02:22