Manage multiple ssh keys on geroku

so I have a pair of ssh keys that are used for other accounts that I have. Now I need to be able to clone the heroku repository on my computer. I created a new ssh key and used the hero keys: add it to my heroku account. However, when I try to clone the repository, I get this error: Your key with fingerprint: .... is not authorized to access rural-visions. fatal: the remote end hung up unexpectedly Your key with fingerprint: .... is not authorized to access rural-visions. fatal: the remote end hung up unexpectedly

I heard that I need to create a configuration file in the .ssh folder, but I do not know what to add there.

Any help would be really appreciated!

+4
source share
1 answer

I sometimes have to work with a bunch of heroku accounts, and I came across this. Here is what I usually do:

  • Clear identifiers

     $ ssh-add -D 
  • ssh-add the key I need for the current account

     $ ssh-add ~/.ssh/an_account_key 
  • Now I can click on my heroku application

     $ git push heroku-remote master 

Of course, this assumes that the key has already been added to the heroku account. You can do it with

 $ heroku keys:add 

The correct way to solve this is with the SSH configuration in ~ / .ssh / config, but this is a bit for me, as I only switch accounts from time to time.

The Google SSH configuration file should get a lot of results, but here some of them may help:

+15
source

All Articles