2013-01-19 34 views
1

「無指定帳戶」 [注:這是不是使用--app APPNAME,這是一個不同的問題]Heroku的軌道 - 所有命令給

由於進行這兩項工作和個人項目的GitHub我的機器有混合了它的git/heroku設置。我試圖回到默認值,但找不到所有'工件'。

試圖做的命令,如

heroku keys 
heroku keys:add 
heroku keys:clear 

甚至試圖再次添加我的鑰匙!

heroku keys:add --app blazing-planet-3592 

都讓我

durrantm.../linker$ heroku keys:clear 
Removing all SSH keys... failed 
! No account specified. 
!  
! Run this command with --account <account name> 
!  
! You can also add it as a git config attribute with: 
!  git config heroku.account work 

我最近安裝的Heroku賬戶管理多個帳戶。

回答

4

我的問題的關鍵是我需要將--account personal添加到每個命令,我用它來引用文件~/.heroku/account/personal(當我開始使用heroku'帳戶'功能時創建的),它具有我的信息,如:

$ cat ~/.ssh/accounts/personal 
:username: [email protected] 
:password: b1951...868b6 

所以我的命令,只是需要:

$ heroku keys --account personal 
$ heroku keys:add --account personal 
$ heroku keys:clear --account personal 
$ heroku keys:add --app blazing-planet-3592 --account personal 

我也隨後跑了Heroku的帳戶:添加工作,然後把我的工作憑證(電子郵件& PW提示時)的(不同的)有分我用於工作。

它告訴我的東西添加到我的.ssh/config文件 -

以下內容添加到您的〜/ .ssh/config中

Host heroku.work 
    HostName heroku.com 
    IdentityFile /PATH/TO/PRIVATE/KEY 
    IdentitiesOnly yes 

但我離開那個百廢待興,現在(將歡迎關於選項的建議,需要時等)。

+0

謝謝你的回答。我很沮喪! – sam452

+0

是的,非常感謝您發佈此信息。 – duma