I am new to Rails, and I was trying to deploy a very simple app to Heroku. This is the second app that I deploy, and the first one I was able to do it just fine. However I am having some issues with this one. Whenever I "git push heroku master", I get this error:
! Your key with fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx is not authorized to >access my_heroku_app.
fatal: The remote end hung up unexpectedly
I have tried to manage my keys after logging in heroku. If I type in my console "heroku keys", then I get:
No keys for myemailaddress.
However, If I run the comand "heroku keys:add" I get
Found existing public key: /Users/michele/.ssh/id_rsa.pub Uploading ssh public key /Users/michele/.ssh/id_rsa.pub ! Fingerprint already exists. Please use one ssh key per Heroku account
Please help me! This is soo frustating, I have no idea what's wrong! Thank you
I had the same problem, I followed this post and others of the same kind without success :-((
Finally, I found the solution: I had to add my new rsa identity in my machine!
So, first of all I created a new rsa key:
then added it to my machine
and, finally, to Heroku
After that,
worked like a charm!
Hope this helps.
I have the same issue last week. This linked helped me out. I hope it helps you out a little. http://devcenter.heroku.com/articles/keys
In my case,
heroku keys
already had the correct key listed. So, all I had to do was runssh-add /path/to/that/key
and then everything started working fine.I, too have multiple keys and multiple heroku accounts, so I come across this problem every few months. As mentioned Giordano Scalzo, Tom Carchrae, and user664833, the main problem is ssh-agent, which you control using the
ssh-add
command. The man page (man ssh-add
) is actually pretty clear and concise, so check it out.You can list all the keys that ssh-agent knows about with:
You can delete all the keys that ssh-agent knows about with:
Or delete a specific key with
Don't worry! You aren't actually deleting the keys, only changing which ones ssh-agent automatically tries to use, for example, when you try to push to heroku. It's easy to add and delete keys as needed, so for me, when I get frustrated by this problem, the easiest way to fix it is to delete all the keys and add back in only the one I want to use at the moment.
youn will need to create new keys and add those
specify a new file name after running
then (in my case)
Your computer has an SSH key, but that SSH key is associated with another Heroku account.
If you need to use both accounts for different applications on the same computer you should make a new SSH key on your machine and upload it to Heroku:
Make sure to save it as '/Users/User/.ssh/new_id_rsa.pub' when the prompt asks you.
You then need to add an alternate host for
heroku.com
to your~/.ssh/config
:And then update the
.git/config
in your project to use the host alias:By choosing between
heroku
andheroku-alt
in the remote of the.git/config
files of specific projects you can manage which projects use which credentials.