Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails heroku键设置正确吗?_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails heroku键设置正确吗?

Ruby on rails heroku键设置正确吗?,ruby-on-rails,heroku,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 Herok

我正在尝试向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 

我说的对吗?如果是这样,我该如何解决这个问题?

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

如果您
cat~/.ssh/id\u rsa.pub
,您将看到“您的_email@youremail.com“最后。您需要使用您的电子邮件(或主机名)生成一个新的

删除坏的密钥

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

我必须生成一个新的吗?我已经有一个了。请参阅更新。您的.ssh/id\u rsa.pub中的密钥是什么?看起来你需要生成一个不是你的_email@youremail.com,请参阅我在与您一起创建新id_rsa.pub时的编辑电子邮件我最终按照您的建议使用ssh-keygen-t rsa-C“MYEMAIL”创建了一个新密钥。