sabari sabari - 1 year ago 96
Git Question

ssh clone not working with github

I am new to Git and GitHub.

I created a new repository and tried to clone on my local machine.

It worked for https and git-readonly URLs. That is, the following worked fine:

  • git clone

  • git clone git://

But when I tried
git clone
, it didn't work. It gave the following error message:

Cloning into 'testRepo'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

And then I tried
, but I got the error:

"Permission denied (publickey)."

instead of the welcome message.

What should I do to fix this? What is the reason for the error?

Answer Source

As per GitHub help, the error you're getting is related to wrong SSH configuration. Please follow indications for setting up SSH for GitHub and check accordingly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download