git clone fails for Heroku project

前端 未结 3 1888
旧时难觅i
旧时难觅i 2021-01-31 13:02

(on Mac) I\'m trying to clone my project from my new computer. I first generated the ssh key pairs:

heroku keys:add /Users/y/.ssh/heroku_rsa.pub
<
相关标签:
3条回答
  • 2021-01-31 13:08
    heroku git:clone -a "your_project_name_on_heroku"
    

    This simple command works fine (provided that your ssh key is correctly added before)

    0 讨论(0)
  • 2021-01-31 13:10

    I had a similar problem. At first, I did not have a key called id_rsa.pub. I only had a key for github: github_rsa.pub. I ran heroku keys and saw that it did recognize that I had a key. But apparently heroku does not like that github key. Here's what I did:

    $ssh-keygen -t rsa
    $heroku keys:clear
    $heroku keys:add 
    $git clone git@heroku.com:my-app.git -o heroku
    

    This downloaded all the files for the project successfully.

    0 讨论(0)
  • 2021-01-31 13:23

    It looks like your key is not loaded. Only default named key (id_rsa) loaded by default. Load the heroku key by using ssh-add command:

    ssh-add ~/.ssh/heroku_rsa
    
    0 讨论(0)
提交回复
热议问题