I'm on Mac Snow Leopard and I just installed git
.
I just tried
git clone git@thechaw.com:cakebook.git
but that gives me this error:
Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/`
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
What am I missing?
I've also tried doing ssh-keygen
with no passphase but still same error.
This info is working on theChaw but can be applied to all other git repositories which support SSH pubkey authentications. (See gitolite, gitlab or github for example.)
Further information can be found on https://help.github.com/articles/generating-ssh-keys (thanks to @Lee Whitney)
Got same error report.
Fixed with using HTTP instead. Since I don't want set "SSH keys" for a test PC.
Change URL to HTTP when clone:
My problem is a little bit different: I have URL set when adding a existing local repo to remote, by using:
To fix it, reset URL to HTTP:
BTW, you may check your URL using command:
Hope this will help some one like me. :D
In addition to Rufinus' reply, the shortcut to copy your ssh key to the clipboard in Windows is:
type id_rsa.pub | clip
Refs:
I had a slight different situation, I was logged on to a remote server and was using git on the server, when I ran any git command I got the same message
The way I fixed it was by changing the file /etc/ssh_config on my Mac. from
to
Use the ssh link from Github but make sure to not append it with ssh just use what the ssh tab on git hub gives you to clone your repo.
The easiest solution to this, when you are trying to push to a repository with a different username is: