2

I am in a class that is asking us to put our ruby on rails app on Heroku. They gave us step by step instructions to set up on Heroku, which I followed. I can login to heroku from the command line, but when I try to push my app to it, I get this:

Read from socket failed: Connection reset by peer
fatal: The remote end hung up unexpectedly

I've pinged the server, which worked. I've tried restarting, coming back after a day, recreating the app, which worked fine. I checked to make sure I have Heroku tool-belt. I've spent hours searching google. I have yet to find a solution.

upon running ssh -vvv mylogin@heroku i got

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname heroku: Name or service not known

upon running ssh git@heroku.com -T i got

Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Permission denied (publickey).

so I tried git push heroku master again and got

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Any ideas?

BooBailey
  • 540
  • 1
  • 9
  • 31

2 Answers2

3

So I got it to work! A thanks to those who responded - they set my on my path to a solution. So here's what I did.

I ran ssh -vvv reneeggallison@gmail.com@heroku which gave me

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname heroku: Name or service not known

Upon researching this error, I decided to run ssh git@heroku.com -T, receiving this is respond:

Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Permission denied (publickey).

this changed my error resulting from git push heroku master from

Read from socket failed: Connection reset by peer
fatal: The remote end hung up unexpectedly

to

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

So upon researching that error, I ran heroku keys:add ~/.ssh/id_rsa.pub which returned:

Uploading SSH public key /home/renee/.ssh/id_rsa.pub... done

This seemed good to I ran git push heroku master again and met success. So thanks everyone and good luck

BooBailey
  • 540
  • 1
  • 9
  • 31
1

Try debugging using the following command:

ssh -vvv yourlogin@heroku

Here are some debugging tips from an SO answer

Community
  • 1
  • 1
Scott Bartell
  • 2,801
  • 3
  • 24
  • 36