【问题标题】:error in deploying django app to heroku from windows从 Windows 将 django 应用程序部署到 heroku 时出错
【发布时间】:2013-02-23 01:23:10
【问题描述】:

在 git-shell 中输入以下命令:

(venv) path_to_project_directory> git push heroku master

给出以下错误:

警告:将 'heroku.com,50.19.85.154' (RSA) 永久添加到已知列表中 主机。

权限被拒绝(公钥)。 致命:无法从远程存储库读取。

请确保您拥有正确的访问权限 并且存储库存在。

我通过 (git remote -v) 命令检查了配置文件中的遥控器 --- 但遥控器似乎已正确添加:-

(venv) path_to_project_directory> git remote -v

heroku git@heroku.com:something.git (fetch)

heroku git@heroku.com:something.git(推送)

来源用户名@bitbucket.org/username/repo_name.git (fetch)

来源用户名@bitbucket.org/username/repo_name.git(推送)

我还通过(heroku 密钥)命令检查了目录 C:\Users\abc.ssh\ 中的 SSH 密钥:-

(venv) path_to_project_directory> path_to_heroku\bin\heroku 键

=== myemail@email.com 密钥

ssh-rsa xxxxxxxxx== abc@abc-PC

此 SSH 密钥与我的 Heroku 帐户页面上显示的密钥相同...

那么为什么在我尝试推送时会出现此错误?

【问题讨论】:

标签: django git deployment heroku


【解决方案1】:

您最好删除您的密钥,生成一个新密钥并添加它。 Heroku 的说明是here。通常,您希望使用一个密钥,而不是 Heroku 的单独密钥。

您的流程如下所示:

$ heroku keys:remove myemail@email.com
$ ssh-keygen -t rsa
$ heroku keys:add

【讨论】:

    猜你喜欢
    • 2019-06-25
    • 2018-12-25
    • 2021-05-16
    • 2020-08-04
    • 1970-01-01
    • 1970-01-01
    • 2015-09-22
    • 2017-09-14
    相关资源
    最近更新 更多