0

我正在尝试将项目部署到heroku。我正在开发win7。

$ git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.    

Please make sure you have the correct access rights
and the repository exists.    

$ heroku keys
Enter your Heroku credentials.
Email: MYREALEMAIL
Password (typing will be hidden):
=== MYREALEMAIL Keys
ssh-rsa AAAAB3NzaC...ol1Ukh0Q== your_email@youremail.com    


$ heroku keys:remove your_email@youremail.com
Removing your_email@youremail.com SSH key... done    

dnir@BCMAM27 /f/EasyPHP-12.1/www/phantomjs123 (master)
$ heroku keys
You have no keys.    

$ heroku keys:add f:/.ssh/id_rsa.pub
Uploading SSH public key f:/.ssh/id_rsa.pub... done    

$ heroku keys
=== MYREALEMAIL Keys
ssh-rsa AAAAB3NzaC...ol1Ukh0Q== your_email@youremail.com    


$ git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.    

Please make sure you have the correct access rights
and the repository exists.

我担心最后一行实际上应该说:

ssh-rsa ****3NzaC...ol1Uk****== MYACTUALEMAIL 

我在这方面是正确的吗?如果是这样,我该如何解决?

4

2 回答 2

1

看起来像一个 SSH 问题。我认为您需要根据您的电子邮件生成一个新的 SSH 密钥。

如果您cat ~/.ssh/id_rsa.pub在最后看到“your_email@yourremail.com”。您需要使用您的电子邮件(或主机名)生成一个新的。

于 2013-10-10T16:32:11.803 回答
1

查看这篇关于如何在 heroku 上设置 ssh 密钥的文章。

删除坏密钥

heroku keys:remove your_email@youremail.com

然后验证您是否有 ssh 密钥

cat ~/.ssh/id_rsa.pub

如果不创建一个

ssh-keygen -t rsa -C "your_email@youremail.com"

然后将密钥上传到heroku

heroku keys:add
于 2013-10-10T16:33:44.913 回答