git push heroku master permission denied

前端 未结 7 1987
有刺的猬
有刺的猬 2021-01-31 02:04

I am following the ruby.railstutorial. I run the command \"git push heroku master\" and it spits out this error.

Permission denied (publickey).
fatal: Could not          


        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 02:28

    ssh-keygen -t rsa
    

    Above is optional as you could also link to an existing key. Heroku will prompt to select the key in the next step.

    heroku keys:add
    

    Add your newly created key or an existing one. If you are still running into the issue, you will most likely need to add the key to your machine's list of ssh keys by performing the following:

    ssh-add ~/.ssh/name_of_your_rsa
    

    and confirm that your ssh has been added

    ssh-add -l
    

    This should get you access to push to Heroku's remote repo.

提交回复
热议问题