I\'m on Mac Snow Leopard and I just installed git
.
I just tried
git clone git@thechaw.com:cakebook.git
but that gives
I had to copy my ssh keys to the root folder. Google Cloud Compute Engine running Ubuntu 18.04
sudo cp ~/.ssh/* /root/.ssh/
More extensive troubleshooting and even automated fixing can be done with:
ssh -vT git@github.com
Source: https://help.github.com/articles/error-permission-denied-publickey/
This works for me:
ssh-add ~/.ssh/id_rsa
I have just experienced this issue while setting my current project, and none of the above solution works. so i tried looking what's really happening on the debug list using the command ssh -vT git@github.com. I notice that my private key filename is not on the list. so renaming the private key filename to 'id_rsa' do the job. hope this could help.
It worked for me.
Your public key is saved to the id_rsa.pub;file and is the key you upload to your account. You can save this key to the clipboard by running this:
pbcopy < ~/.ssh/id_rsa.pub
Note that (at least for some projects) you must have a github account with an ssh key.
Look at the keys listed in your authentication agent (ssh-add -l)
(if you don't see any, add one of your existing keys with ssh-add /path/to/your/key (eg: ssh-add ~/.ssh/id_rsa))
(if you don't have any keys, first create one. See: http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html or just google ssh-keygen)
To verify that you have a key associated with your github account:
Go to: https://github.com/settings/ssh
You should see at least one key with a hash key matching one of the hashes you saw when you typed ssh-add -l just a minute ago.
If you don't, add one, then try again.