问题描述
我在将代码推送到Heroku时遇到麻烦.我有一个帐户,但是忘记了密码.我创建了一个新帐户并尝试使用它,但现在它显示了此错误:
您的帐户someoneelse@gmail.com无权访问!SSH密钥指纹:
如何使用新帐户登录?我想使用一个新帐户删除此错误消息.我已将最新的ssh密钥上传到heroku.我已经尽一切努力将代码推送到heroku(基本设置)上,但是我无法克服此错误.
您帐户中的任何应用程序都有两个ssh密钥,因此您应删除〜/.ssh/"中没有的一个ssh密钥.文件夹或按照以下步骤操作.
这是解决方案:
-
转到 www.heroku.com 并使用引发错误的帐户登录./p>
-
转到应用程序设置.(例如,对于名为"rails-demo"的应用程序,请转到rails-demo设置并检查是否有两个ssh密钥)
-
删除系统中不再存在的密钥
-
或者您可以将它们都删除,然后使用这些命令生成新的.
->ssh-keygen -t rsa
->heroku键:添加
-
上传新的,然后在您的控制台中输入
->heroku登录
-
使用您的帐户登录,然后将其推送到您的应用程序.
-
现在解决了.
您需要:
- 清除Heroku应用程序中本地没有的任何其他ssh密钥(请参阅 SSR 的编辑)
-
注册您的新帐户(如"管理多个Heroku帐户"):
(2013年,
ddollar/heroku帐户
已弃用)
将heroku/heroku-帐户
与heroku插件一起使用:安装heroku帐户
heroku帐户:添加myNewAccount
,然后添加Heroku凭据(电子邮件,密码)
确保您的〜/.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:
Go to www.heroku.com and login with the account that raises the error.
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 keys:add
Upload the new one and then in your console type
-> heroku log-in
Log in with your account and then push it to you app.
It's solved now.
You need to:
- clean any extra ssh key in your Heroku app that you don't have locally (See SSR's edit)
register your new account (as described in "Managing Multiple Heroku Accounts"):
(2013,
ddollar/heroku-accounts
deprecated)
Useheroku/heroku-accounts
withheroku plugins:install heroku-accounts
heroku accounts:add myNewAccount
followed by Heroku credentials (Email, password)
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无权访问< app-name>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!