我会非常详细,因为我也跟着上建议相关的问题 ,并没有奏效。
我在Mac OS X 10.7试图进行两次的Heroku账户工作。 让我们把这些账户first
和second
要开始清理,我删除键在~.ssh/
运行heroku keys:remove
这两个帐户,以摆脱现有密钥,并运行ssh-添加-D删除现有条目(换句话说:〜的.ssh /是空的,除了known_hosts中, heroku keys
说,我没有钥匙,和ssh-添加-L说,有没有条目。
我heroku login
的第一个帐户,我运行这些:
ssh-keygen -t rsa -C "first@example.com" -f ~/.ssh/id_rsa_first
ssh-add ~/.ssh/id_rsa_first
heroku keys:add ~/.ssh/id_rsa_first.pub
然后我heroku logout
和heroku login
进入第二个帐户,我运行这些:
ssh-keygen -t rsa -C "second@example.com" -f ~/.ssh/id_rsa_second
ssh-add ~/.ssh/id_rsa_second
heroku keys:add ~/.ssh/id_rsa_second.pub
在这两种情况下,我记下了关键的指纹,我会打电话给fingerprint_first
和fingerprint_second
。
现在我heroku login
到first
和git push heroku master
工作正常,然后heroku login
到second
上的第二应用程序和git push heroku master
将失败,并错误
! Your key with fingerprint fingerprint_first is not authorized to access second-app-name.
如果我删除了从与SSH列表ssh-add -d ~/.ssh/id_rsa_first
,然后git push heroku master
在第二应用的工作原理,但现在如果我回去给第一应用和heroku login
的第一个帐户, git push heroku master
过程的失败。
请帮忙 :)