2

我正在尝试将 Django 应用程序部署到 Heroku,但是当我运行以下命令时出现这个奇怪的错误。

知道为什么会这样吗?我用谷歌搜索了它,但没有发现任何有用的东西。

root@ubuntu:~/Desktop/djangos/jobs# git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

提前感谢您的任何提示/帮助!

4

3 回答 3

7

I had same problem , Add your ssh key to heroku by $ heroku keys:add . check out my blogpost http://www.codesucksmybrain.blogspot.com/2012/04/deploy-django-app-on-heroku-platform.html

于 2012-05-18T05:56:23.193 回答
3

首先,您应该登录。

$ heroku login
Enter your Heroku credentials.
Email: adam@example.com
Password: 
Could not find an existing public key.
Would you like to generate one? [Yn] 
Generating new SSH public key.
Uploading ssh public key /Users/adam/.ssh/id_rsa.pub

此外,如果您登录,您应该尝试“ git pull heroku master ”,然后尝试“ git push heroku master ”。

入门

于 2012-05-17T21:12:24.737 回答
1

验证 SSH-KEY 的名称是否为“id_rsa”,并且密钥是您在此文件中信任的密钥,如果可以安全地重新创建密钥并将其保留为“id_rsa”名称

于 2012-05-17T21:10:38.667 回答