git push heroku master permission denied

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

    Some help for Windows 7 users with Github Windows client installed:

    Even though heroku toolbelt reports it found my git_hub public key and uploaded it, 'git push heroku master' failed. After taking the steps below, it works fine.

    1. Create .ssh folder under your User folder if one does not exist. If it does, delete all files in it (this assumes you are OK with starting from scratch with ssh keys).

    2. In Windows Explorer, right click the .ssh folder, and choose Git bash from the context menu. This is installed along with the Github Windows client software.

    3. In the bash window enter ssh-keygen -t rsa -C "yourname@email.com" When prompted enter a passphrase (don't lose this).

    4. Close the bash shell window.

    5. From a cmd prompt in your project's root, enter heroku keys:add. This will find and upload the key you just created from your /.ssh file to Heroku.

    Now you can enter git push heroku master to push you app up to Heroku. Note: you will need to add your newly generated ssh public key to your Github account when done.

提交回复
热议问题