Reputation: 79
When I try to push a git project to heroku, it gives me an 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.
I've tried almost anything and everything I found on the internet - adding keys, uploading, removed every key and then retried. I've checked there are no multiple accounts. I've also checked the .git/config file to see if the project name is accurate.
I noticed that after I delete the known_hosts file and try to push the project, it says -
The authenticity of host 'heroku.com (50.19.85.132)' can't be established.
RSA key fingerprint is *some.random.fingerprint.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,50.19.85.154' (RSA) to the list of known hosts.
! Your key with fingerprint my.original.configured.fingerprint is not authorized to access first-app.
fatal: The remote end hung up unexpectedly
This is interesting because that is not my fingerprint. The one I have in ib_rsa.pub is different from the one that heroku tries to use. I did a heroku keys and I see only one key (the one it's supposed to use.) I have no idea where it's picking this weird key from. Any suggestions will help. Thanks!
Upvotes: 2
Views: 4393
Reputation: 91
For the beginning, should, as mentioned above -
to avoid Fingerprint problems just enter
$ heroku git:remote -a your-heroku-app-name
Then, you need create a key again:
ssh-keygen -t rsa
And add to heroku:
heroku keys:add
And follow you can push:
$ git push branch_name:master
Upvotes: 2
Reputation: 41
to avoid Fingerprint problems just enter
$ heroku git:remote -a your-heroku-app-name
(my case: $ heroku git:remote -a blooming-plateau-75741)
and follow with $ git push heroku master
Upvotes: 4
Reputation: 79
I found the solution.
in .git/config, changed the project name in [remote "heroku"] to the name given by heroku.
Upvotes: 4