heroku键设置正确吗?

时间:2013-10-10 16:28:10

标签: ruby-on-rails heroku

我正在尝试将项目部署到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 

我对此是否正确?如果是这样,我该如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

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

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

答案 1 :(得分:1)

check out this article on how to set up ssh keys on heroku.

删除坏密钥

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