git push heroku master permission denied

前端 未结 7 1962
有刺的猬
有刺的猬 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:42

    I faced the same issue. In my .ssh folder I had a file called 'Known Hosts'. I kept trying to delete and create new ssh keys it did not work. In the end I just deleted everything in .ssh including 'Known Hosts' and then created a new rsa key using:

    ssh-keygen -t rsa
    

    then I added this new key to heroku using:

    heroku keys:add
    

    then create a new heroku repo and pushed my app to it:

    heroku create
    git push heroku master
    
    0 讨论(0)
提交回复
热议问题