多个Heroku帐户无法正常工作 [英] multiple heroku accounts not working
问题描述
我会非常详细,因为我遵循相关的建议问题,它没有奏效。
我在Mac OS X 10.7上尝试创建两个heroku帐户。让我们称这些账户第一
和第二
干净,我删除了〜.ssh /
中的键,在两个帐户上运行
heroku键:删除
删除现有的密钥,并运行ssh-add -D删除现有的条目(换句话说:〜.ssh /为空,除了known_hosts; heroku keys
我没有钥匙,而ssh-add -L表示没有条目。
<我的code> heroku登录进入第一个帐户,我运行这些:
pre $
ssh-keygen -t rsa -Cfirst@example.com-f〜/ .ssh / id_rsa_first
ssh-add〜/ .ssh / id_rsa_first
heroku keys:add〜/ .ssh / id_rsa_first.pub
然后我将< heroku登录
放入第二个帐户,我运行这些:
ssh-keygen -t rsa -Csecond@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
to first
和 git push heroku master
正常工作,然后 heroku login
到第二个
在第二个应用程序上,
!指纹fingerprint_first的密钥无权访问第二个应用程序名称。
如果我使用 ssh-add -d〜 /.ssh/id_rsa_first
,然后 git push heroku master
可以在第二个应用程序中使用,但现在如果我回到第一个应用程序,并且 heroku login
到第一个账户, git push heroku master
当然会失败。
请帮忙:) 最后, 我从头开始重新启动,删除所有密钥,并添加了 David Dollar的插件heroku-accounts 现在,当我切换项目时我甚至不需要注销/注销,因为我可以在每个项目目录上设置一个Heroku帐户。 I'll be very detailed, as I followed the advice on a related question and it didn't work. I'm on Mac OS X 10.7 trying to make two heroku accounts work. Let's call these accounts To start clean, I removed the keys in I then I In both cases I note down the key fingerprints, which I'll call Now I If I remove that from the ssh list with Please help :) At the end, this answered it. I restarted from scratch, removing all keys, and added David Dollar's plugin heroku-accounts Now it works, and I don't even need to log out/in when I switch projects, as I can set a Heroku account on each project directory. 这篇关于多个Heroku帐户无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
first
and second
~.ssh/
, run
heroku keys:remove
on both accounts to get rid of existing keys, and run ssh-add -D to remove existing entries (in other words: ~.ssh/ is empty, except for known_hosts; heroku keys
says I have no keys, and ssh-add -L says there are no entries.heroku login
into the first account and I run these: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
and heroku login
into the second account and I run these: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
and fingerprint_second
.heroku login
to first
and git push heroku master
works fine, then heroku login
to second
on a second app and git push heroku master
fails, with the error ! Your key with fingerprint fingerprint_first is not authorized to access second-app-name.
ssh-add -d ~/.ssh/id_rsa_first
, then git push heroku master
works on the second app, but now if I go back to the first app and heroku login
to the first account, git push heroku master
of course fails.