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?

David Cain
  • 16,484
  • 14
  • 65
  • 75
szatan
  • 517
  • 4
  • 8
  • 26

2 Answers2

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.

David Cain
  • 16,484
  • 14
  • 65
  • 75
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

The SE I loved is dead
  • 1,517
  • 4
  • 23
  • 27
yeafee
  • 11
  • 2