多个Heroku帐户无法正常工作 [英] multiple heroku accounts not working

查看:205
本文介绍了多个Heroku帐户无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会非常详细,因为我遵循相关的建议问题,它没有奏效。



我在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注销和 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 第二个在第二个应用程序上, git push heroku master 失败,出现错误

 !指纹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 first and second

To start clean, I removed the keys in ~.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.

I 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

then I 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

In both cases I note down the key fingerprints, which I'll call fingerprint_first and fingerprint_second.

Now I 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.

If I remove that from the ssh list with 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.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆