2

I am working through the "Try Git" tutorial.

When I get to the chapter "1.11 Pushing Remotely", and try to run:

$ git push -u orgin master

I get this error:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Any ideas?

2 Answers 2

1

You've probably not added a public key to your SSH keys. Do that:

$ ssh-keygen -t rsa

Copy the created public key (id_rsa.pub) to your account's list of SSH keys, then try pushing again.


See the relevant help page: Generating SSH Keys for a more in-depth response.

0
0

You can use the below command to get keys for the default account.

$ ssh-keygen -t rsa

More info: Multiple SSH Keys settings for different github account

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.