heroku cli登录显示错误的帐户信息

时间:2013-10-14 04:11:04

标签: git heroku heroku-toolbelt

使用我的个人帐户成功登录命令行时使用:

$heroku login

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

当我推动:

git push staging master

它给了我一个错误:

!  Your account SOMEONE-ELSE@gmail.com does not have access to MYAPP-staging.
!
!  SSH Key Fingerprint: FINGERPRINT_REMOVED

有趣的是,错误中显示的帐户是我使用网络界面添加为协作者的人。 Heroku支持直到早上才在线,我无法推出任何代码。我可以重新配置我的环境等,但由于错误消息中的帐户从未在我的机器上使用过,我觉得这可能是heroku方面的错误。

有什么想法吗?之前看过这个吗?

感谢。

4 个答案:

答案 0 :(得分:16)

您需要手动添加ssh键:

ssh-add -K ~/.ssh/id_rsa

注销后再次登录

heroku logout

heroku login

答案 1 :(得分:4)

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

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

答案 2 :(得分:0)

尝试重新生成您的ssh密钥。

请看这个页面:https://devcenter.heroku.com/articles/keys

答案 3 :(得分:0)

按照以下步骤操作:(管理您的 SSH 密钥)

1.在本地创建和添加 SSH 密钥

<块引用>

$ 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.将此密钥添加到 Heroku 帐户

<块引用>

$ heroku 键:添加

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

3.验证连接

<块引用>

$ ssh -v git@heroku.com

现在注销并登录

另外,使用这个$ heroku keys来检查密钥

参考:Ckick here

相关问题