git - 带有指纹的 key 在 Heroku 中未经授权

标签 git heroku

像许多其他人一样,尝试让我的应用程序推送到 Heroku,但不断出现此错误

$ heroku login
Enter your Heroku credentials.
Email: my@email.com
Password (typing will be hidden): 
Found existing public key: /Users/scotty/.ssh/id_rsa.pub
Uploading SSH public key /Users/scotty/.ssh/id_rsa.pub... done
Authentication successful.
$ git push heroku master

 !  Your key with fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx is not authorized to access todolist.

fatal: The remote end hung up unexpectedly

我完成了 Heroku page 上的所有步骤我已经尝试了这些类似问题中的大部分建议修复:

Your key with fingerprint .... is not authorized to access... myapp. The remote end hung up unexpectedly. HEROKU, GIT CLONE

Why is my key w/ fingerprint not authorized when I try to push latest changes to Heroku?

Cannot push to Heroku because key fingerprint

我已经为 heroku 添加了一个新 key ,尝试了 ssh-add -D 命令删除所有 key ,从 Heroku 中删除了所有 key ,无论我尝试什么,我仍然会遇到同样的错误。

我只有一个 Heroku 帐户,所以多帐户问题不是问题所在。我现在只有一个 ssh key 用于我的 macbook 上的 github。

上面链接的答案中没有提到任何建议吗?

提前致谢。

最佳答案

生成一个新 key :

 ssh-keygen -t rsa -f ~/.ssh/id_rsa_heroku

将其添加到您的本地 ssh 代理:

ssh-add ~/.ssh/id_rsa_heroku

确保新 key 显示在 ssh-agent 中:

 ssh-add -l

使用 -d 标志删除不必要的键。 (这不会删除 key ,只会将其从 ssh-agent 中删除。)

ssh-add -d /Users/Niko/.ssh/id_rsa_hellonico

将 ssh key 添加到您的帐户:

https://dashboard.heroku.com/account

准备推送到heroku

git push heroku master 

关于git - 带有指纹的 key 在 Heroku 中未经授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14161621/

相关文章:

git - 什么是 "git remote add ..."和 "git push origin master"?

Django 操作错误 : could not fork new process for connection

heroku - 在 Heroku 上使用 Redis 的服务器端 Flask session

ruby-on-rails - 我可以将我编译的系统库(例如 libxml2)合并到可以部署到 Heroku 的 gem(例如 nokogiri)中吗?

eclipse - 当开发人员在他们的项目构建路径中使用不同版本的 JBoss 时,如何最好地处理 Git 中的 .classpath 文件?

python - Git:保持同一文件的两个位置同步

git - 使用 Git diff 检测代码移动 + 如何使用 diff 选项

git - 通过openssh从git Windows服务器克隆

Heroku 不会在 Rails 4 中的 Assets 管道下编译文件

linux - 类似 heroku 的 vps 部署工具