3
votes

Trying, like so many others, to get my app to push to Heroku but keep getting this error

$ heroku login
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden): 
Found existing public key: /Users/scotty/.ssh/id_rsa.pub
Uploading SSH public key /Users/scotty/.ssh/id_rsa.pub... done
Authentication successful.
$ git push heroku master

 !  Your key with fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx is not authorized to access todolist.

fatal: The remote end hung up unexpectedly

I completed all of the steps on the Heroku page and I have tried most of the suggested fixes in these similar questions:

Your key with fingerprint .... is not authorized to access... myapp. The remote end hung up unexpectedly. HEROKU, GIT CLONE

Why is my key w/ fingerprint not authorized when I try to push latest changes to Heroku?

Cannot push to Heroku because key fingerprint

I've added a new key just for heroku, tried the ssh-add -D command to remove all keys, removed all keys from Heroku, and no matter what I try, I still get the same error.

I only have one Heroku account so the multiple account issue is not the problem. I now only have a single ssh key that I use for github on my macbook.

Does anyone have any suggestions not mentioned in the answers linked above?

Thanks in advance.

1
After you remove all keys with ssh-add -D, do you then manually add the Heroku key with ssh-add <path to Heroku key>?redhotvengeance
I did that with the same result :(Scotty Bollinger

1 Answers

7
votes

Generate a new key with:

 ssh-keygen -t rsa -f ~/.ssh/id_rsa_heroku

Add it to your local ssh agent:

ssh-add ~/.ssh/id_rsa_heroku

Make sure that the new key is showing up in the ssh-agent with:

 ssh-add -l

Remove unnecessary keys with the -d flag. (This will not delete the key, only remove it from the ssh-agent.)

ssh-add -d /Users/Niko/.ssh/id_rsa_hellonico

Add the ssh key to your acccount:

https://dashboard.heroku.com/account

Ready to push to heroku

git push heroku master