4

I'm not sure what's wrong with my heroku account, but I'm no longer able to clone my heroku project.

NOTE : Please do not close this question considering as duplicate question of this as I have described below that I tried all solutions mentioned in the answers to that question

!  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 genqr

Whenever I do

 git clone git@heroku.com:genqr.git

I have done everything humanly possible.

1. I have deleted all my keys of heroku added a new key

using

heroku keys:remove 

and

heroku keys:add /home/vire2egi/.ssh/setup.pub

Still, the same problem when cloning the project happens.

2. I also added heroku key to ssh-add

ssh-add /home/vire2egi/.ssh/setup 

3. Also added key to keychain

eval `keychain --eval setup`

All the above commands result in success but still I can't clone the repo

4. I also did

heroku keys:remove
heroku auth:logout
heroku auth:login ## Authenticated myself and then added the key: still no success

Still no success

5. I also defined a config for heroku, something like

Host heroku.com
  Hostname heroku.com
  User viren2egi
  IdentityFile /home/vire2egi/.ssh/setup 

Still no success.

6. Out of fustration I created a brand new key.

ssh-keygen -t rsa

And repeated all the above set for that key too, but still I get the same problem.

I also cleaned my known_hosts everytime I ran anyone of the above commands just to make sure it does not pick from it.

Note :

Whenever I tried heroku:keys, it always presented me with the correct information of the key that I have added

Can anyone help me?

Community
  • 1
  • 1
Viren
  • 5,812
  • 6
  • 45
  • 98

2 Answers2

3

When you do a git operation it uses any ssh keys you have loaded locally in some order (I believe the order in which they were loaded). It may be that you have an old key still loaded and when you do a git operation it tries that key first and fails and does not go on to the next key if there's a failure.

So... try unloading all your ssh-keys with ssh-add -D, then loading the most recent key you created and added to heroku:

$ ssh-add -D
$ ssh-add /home/vire2egi/.ssh/setup
$ git clone git@heroku.com:genqr.git
???
Ryan Daigle
  • 11,599
  • 2
  • 36
  • 22
  • 1
    That wrong i guess first ssh require during the git operation loop trough all keys untill all keys are run out or it find once once it find it remember it the next time , also I have mention I have tried keychain in my question , JYI tried your approach as well did not work – Viren Jun 21 '12 at 04:39
  • 2
    I was having the same problem as the poster and this solved my problem. Thanks Ryan. – Adam Dec 16 '12 at 02:43
1

I had the same problem. The steps described in http://rakshasingh.weebly.com/1/post/2013/04/accessing-multiple-heroku-accounts-from-one-machine.html helped me well. Last part about cloning from existing heroku app is important.

Esenbek Kydyr uulu
  • 1,553
  • 1
  • 14
  • 19