Search code examples
githerokuheroku-toolbelt

heroku cli login showing wrong account info


When I successfully log in on the command line using my personal account using:

$heroku login

Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden):
Authentication successful.

when I push with:

git push staging master

It gives me an error:

!  Your account [email protected] does not have access to MYAPP-staging.
!
!  SSH Key Fingerprint: FINGERPRINT_REMOVED

What's interesting is that the account shown in the error is someone that I added as a collaborator using the web interface. Heroku support isn't online until morning and I can't push out any code. I can reconfigure my environment etc but since the account in the error message was never used on my machine I feel like it might be an error on heroku's side.

Any ideas? Seen this before?

Thanks.


Solution

  • You need to manually add the ssh keys:

    ssh-add -K ~/.ssh/id_rsa
    

    After that logout and login again

    heroku logout
    
    heroku login