2013-10-14 45 views
12

當我用用我的個人帳號成功登錄,命令行:Heroku的CLI登錄顯示錯誤的帳戶信息

$heroku login 

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

當我推帶:

git push staging master 

它給了我一個錯誤:

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

有趣的是,錯誤中顯示的帳戶是我作爲協作者添加的人員網絡界面。直到早上,Heroku支持不在線,我無法推出任何代碼。我可以重新配置我的環境等,但由於錯誤信息中的帳戶從未在我的機器上使用過,所以我覺得這可能是heroku的錯誤。

任何想法?以前看過這個嗎?

謝謝。

回答

14

您需要手動添加SSH密鑰:

ssh-add -K ~/.ssh/id_rsa 

即註銷後重新登錄

heroku logout 

heroku login 
+0

這難倒我15分鐘。謝謝。 –

+0

這是一個很大的痛苦,謝謝! 任何想法,爲什麼這有效? –

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

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

您需要安裝'accounts'插件:https://github.com/ddollar/heroku-accounts – mamachanko