Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/54.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 git push heroku主机错误权限被拒绝(公钥)_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails git push heroku主机错误权限被拒绝(公钥)

Ruby on rails git push heroku主机错误权限被拒绝(公钥),ruby-on-rails,heroku,Ruby On Rails,Heroku,我是heroku的新手,我不能推进我的rails项目 我可以成功登录heroku,并且我有密钥 Keys ssh-rsa AAAAB3NzaC...oPiDGoh0Gt root@Slava-System-Product-Name 但是当我按下heroku master键时,我收到了 Permission denied (publickey). fatal: The remote end hung up unexpectedly 常见的密钥错误是:权限被拒绝(公钥)。您可以使用key

我是heroku的新手,我不能推进我的rails项目

我可以成功登录heroku,并且我有密钥

 Keys
 ssh-rsa AAAAB3NzaC...oPiDGoh0Gt root@Slava-System-Product-Name
但是当我按下heroku master键时,我收到了

 Permission denied (publickey).
 fatal: The remote end hung up unexpectedly
常见的密钥错误是:权限被拒绝(公钥)。您可以使用keys:add来修复此问题,以通知Heroku您的新密钥

更新,来自以下博客的解决方案有效

  • 创建新的公钥

    ssh-keygen-t rsa

  • 上传到heroku

    heroku密钥:添加/root/.ssh/id\u rsa.pub


  • 我做了这个并上传了SSH公钥。但在尝试“git-push-heroku-master”权限被拒绝(publickey)时也会出现相同的错误。致命:远程端意外挂起公钥的名称是什么?我已经更新了我的答案。我尝试“heroku密钥:添加~/.ssh/id_rsa.pub”任何更改,相同的错误s************@gmail.com密钥ssh rsa AAAAB3NzaC…oPiDGoh0Gtroot@Slava-系统产品名称在我的root/.ssh/i中有以下文件:id\u rsa、id\u rsa.pub、已知的\u主机。我不是舒尔,但我使用同一文件夹中的github密钥?Github以正常方式工作。在此处找到解决方案-
    heroku keys:add ~/.ssh/id_rsa.pub