Reputation: 3272
I have one PC which I use to develop and push my git repository to heroku using git push heroku. Today I need to add another PC which need to be able to push as well. I can't figure it how ?
So far, here is what I did :
I retrieved the key stored in heroku using heroku keys --long > C:\Users\...\.ssh\heroku
I create a config file for ssh in .ssh/config :
Host heroku.com
HostName heroku.com
IdentityFile C:...\.ssh\heroku
IdentitiesOnly yes
I push the key using heroku keys:add C:....ssh\heroku
git push heroku
returns :
Enter passphrase for key 'C:\....\.ssh\heroku : (I leave blank)
Then I get :
Permission denied (publickey)
Upvotes: 0
Views: 84
Reputation: 77053
Instead of copying the public key from heroku, copy the private ssh key from your other PC, and then it should have worked fine.
Alternatively, you could create another set of keys on your new PC, and then push them using heroku keys:add
as detailed here at heroku docs.
Upvotes: 1