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

$heroku login

Enter your Heroku credentials.
Email: ME@gmail.com
Password (typing will be hidden):
Authentication successful.

when I push with:

git push staging master

It gives me an error:

!  Your account SOMEONE-ELSE@gmail.com 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.

有帮助吗?

解决方案

You need to manually add the ssh keys:

ssh-add -K ~/.ssh/id_rsa

After that logout and login again

heroku logout

heroku login

其他提示

1. See all the accounts you are having:
heroku accounts

2. Add appropriate account to current repo:
heroku accounts:set <account_name>

Try to regen your ssh key.

Take a look on this page : https://devcenter.heroku.com/articles/keys

Follow these steps : (Managing Your SSH Keys)

1. Creating and Adding SSH Keys locally

$ ssh-keygen -t rsa

Generating public/private rsa key pair.    
Enter file in which to save the key (/Users/adam/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/adam/.ssh/id_rsa.
Your public key has been saved in /Users/adam/.ssh/id_rsa.pub.
The key fingerprint is:
a6:88:0a:0b:74:90:c6:e9:d5:49:d6:e3:04:d5:6c:3e adam@workstation.local

2. Adding this key to the Heroku account

$ heroku keys:add

Found existing public key: /Users/adam/.ssh/id_rsa.pub
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub... done

3. validating the connection

$ ssh -v git@heroku.com

Now logout and login

Also, use this $ heroku keys for checking keys

Reference: Ckick here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top