本文介绍了Heroku:您的帐户 example@email.com 无权访问 <app-name>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将代码推送到 Heroku.我有一个帐户,但我忘记了密码.我创建了一个新帐户并尝试使用它进行推送,但现在它显示了这个错误:

I am having trouble pushing code to Heroku. I have an account but I've forgotten the password. I created a new account and tried to push with it but now it shows me this error:

Your account someoneelse@gmail.com does not have access to
! SSH Key Fingerprint:

我如何使用新帐户登录?我想使用新帐户删除此错误消息.我已将我最新的 ssh 密钥上传到 heroku.我已经尝试了一切在 heroku 上推送代码(基本设置),但我无法克服这个错误.

How can I log in with the new account? I'd like to remove this error message with a fresh account. I have uploaded my latest ssh key to heroku. I have tried everything to push code on heroku (basic setup), but I can't get past this error.

您帐户中的任何应用程序都有两个 ssh 密钥,您应该删除一个不在您的~/.ssh/"中的应用程序.文件夹或按照以下步骤操作.

Any application in your account has two ssh key and you should remove one which is not in your "~/.ssh/" folder or follow these steps.

解决办法如下:

  1. 转到 www.heroku.com 并使用引发错误的帐户登录.

  1. Go to www.heroku.com and login with the account that raises the error.

转到应用程序设置.(例如,对于名为rails-demo"的应用程序,请转到 rails-demo 设置并检查是否有两个 ssh 密钥)

Go to the applications settings. (e.g. for an application named "rails-demo", go to rails-demo settings and check whether there are two ssh keys)

删除系统中不再存在的密钥

Remove the key which is no longer in your system

或者您可以将它们都删除,然后使用这些命令生成新的.

Or you can remove them both and then generate new one with these commands.

->ssh-keygen -t rsa

->heroku 键:添加

上传新的,然后在您的控制台类型中

Upload the new one and then in your console type

->heroku登录

使用您的帐户登录,然后将其推送到您的应用.

Log in with your account and then push it to you app.

现在已经解决了.

推荐答案

您需要:

  • 清除您本地没有的 Heroku 应用程序中的任何额外 ssh 密钥(请参阅 SSR 的 编辑)
  • 注册您的新帐户(如管理多个 Heroku 帐户"):

(2013,ddollar/heroku-accounts已弃用)
heroku/heroku-accountsheroku 插件一起使用:安装 heroku-accounts
heroku 帐户:添加 myNewAccount 后跟 Heroku 凭据(电子邮件、密码)

(2013, ddollar/heroku-accountsdeprecated)
Use heroku/heroku-accounts with heroku plugins:install heroku-accounts
heroku accounts:add myNewAccount followed by Heroku credentials (Email, password)

确保您的~/.ssh/config 文件有一个myNewAccount' 条目

Make sure your ~/.ssh/config file has an 'myNewAccount' entry

Host heroku.myNewAccount
  HostName heroku.com
  IdentityFile ~/.ssh/id_heroku_myNewAccount_rsa
  IdentitiesOnly yes

然后更改远程来源"网址:

git remote set-url origin git@heroku.myNewAccount:<appname>.git

或者,作为 Ian Vaughan 下面的评论

origin 通常是 heroku 使用 'heroku-toolbelt' 时:

git remote set-url heroku git@heroku.myNewAccount:<appname>.git

最后一步将确保 git push 将使用您的新帐户,而不是旧帐户.

That last step will make sure the git push will use your new account, and not the old one.

请参阅多个 heroku 帐户".

如果您在配置文件中添加User git",则可以删除凭据用户名git":

If you add "User git" in your config file, you can remove the credential user name 'git':

Host heroku.myNewAccount
  User git
  HostName heroku.com
  IdentityFile ~/.ssh/id_heroku_myNewAccount_rsa
  IdentitiesOnly yes

这意味着您可以使用:

git remote set-url origin heroku.myNewAccount:<appname>.git
# or
git remote set-url heroku heroku.myNewAccount:<appname>.git

这篇关于Heroku:您的帐户 example@email.com 无权访问 &lt;app-name&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 17:11