An error occurred while scanning the ssh key when trying to switch heroku accounts

I often need to switch hero accounts and use a script that does the following:

heroku keys:clear && rm ~/.heroku/credentials && heroku list 

after which I need to enter my credentials for the account I want to switch to:

 Enter your Heroku credentials. Email: fake@gmail.com Password: Uploading ssh public key /Users/fake/.ssh/id_rsa.pub ! Fingerprint already exists. Please use one ssh key per Heroku account 

unfortunatelly, I can not get through this error.

any help is much appreciated.

+4
source share
3 answers

delete heroku credentials

rm ~ / .heroku / credentials

And then download the key manually

heroku keys: add ~ / .ssh / otheraccount.pub

Enter your Heroku credentials and there it is!

+4
source

Do not use the same ssh key for multiple accounts. Use one ssh key for one account.

For more information, to fix this problem, you can refer to http://martyhaught.com/articles/2010/12/14/managing-multiple-heroku-accounts/

+2
source

Oddly enough, I could solve the problem: cleaning keys, deleting credentials, switching to other accounts and back.

0
source

Source: https://habr.com/ru/post/1313514/


All Articles