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

问题描述

我在将代码推送到Heroku时遇到麻烦.我有一个帐户,但是忘记了密码.我创建了一个新帐户并尝试使用它,但现在它显示了此错误:

 您的帐户someoneelse@gmail.com无权访问!SSH密钥指纹: 

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


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

这是解决方案:

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

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

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

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

    ->ssh-keygen -t rsa

    ->heroku键:添加

  5. 上传新的,然后在您的控制台中输入

    ->heroku登录

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

  7. 现在解决了.

解决方案

您需要:

确保您的〜/.ssh/config 文件具有" myNewAccount 条目

 主机heroku.myNewAccount主机名heroku.comIdentityFile〜/.ssh/id_heroku_myNewAccount_rsa身份只有 

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

  git远程设置URL来源git@heroku.myNewAccount:< appname> .git 

或者,作为 Ian Vaughan

  git远程设置URL heroku git@heroku.myNewAccount:< appname> .git 

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

在"多个heroku帐户"中了解更多信息.


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

 主机heroku.myNewAccount用户git主机名heroku.comIdentityFile〜/.ssh/id_heroku_myNewAccount_rsa身份只有 

这意味着您可以使用:

  git远程设置URL来源heroku.myNewAccount:< appname> .git# 或者git remote set-url heroku heroku.myNewAccount:< appname> .git 

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:

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.


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.

Here's the solution:

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

  2. 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)

  3. Remove the key which is no longer in your system

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

    -> ssh-keygen -t rsa

    -> heroku keys:add

  5. Upload the new one and then in your console type

    -> heroku log-in

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

  7. It's solved now.

解决方案

You need to:

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

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

And then change the remote 'origin' url:

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

Or, as Ian Vaughan comments below

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

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

See more at "Multiple heroku accounts".


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

That means you can use:

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