I\'m on Mac Snow Leopard and I just installed git
.
I just tried
git clone git@thechaw.com:cakebook.git
but that gives
These are the steps I followed in windows 10
Open Git Bash.
Generate Public Key:
ssh-keygen -t rsa -b 4096 -C "youremailaddress@xyz.com"
Copy generated key to the clipboard (works like CTRL+C)
clip < ~/.ssh/id_rsa.pub
Browser, go to Github => Profile=> Settings => SSH and GPG keys => Add Key
Provide the key name and paste clipboard (CTRL+V).
Finally, test your connection (Git bash)
ssh -T git@github.com
Thanks!
I was getting a similar Permission denied (publickey) error when trying to run a makefile.
As an alternative to the SSH steps above, you can Install the native GitHub for Mac application.
Click Download GitHub for Mac from - https://help.github.com/articles/set-up-git#platform-mac
Once you complete setup with your git hub account (I also installed the git hub command line tools but unsure if this step is required or not) then I received an email -
[GitHub] A new public key was added to your account
and my error was fixed.
In addition to Rufinus' reply, the shortcut to copy your ssh key to the clipboard in Windows is:
type id_rsa.pub | clip
Refs:
The basic GIT instructions did not make a reference to the SSH key stuff. Following some of the links above, I found a git help page that explains, step-by-step, exactly how to do this for various operating systems (the link will detect your OS and redirect, accordingly):
http://help.github.com/set-up-git-redirect/
It walks through everything needed for GITHub and also gives detailed explanations such as "why add a passphrase when creating an RSA key." I figured I'd post it, in case it helps someone else...
Its pretty straight forward. Type the below command
ssh-keygen -t rsa -b 4096 -C "youremailid@yourdomain.com"
Generate the SSH key. Open the file and copy the contents. Go to GitHub setting page , and click on SSH key . Click on Add new SSH key, and paste the contents here. That's it :) You shouldn't see the issue again.
On Windows, make sure all your apps agree on HOME. Msys will surprisingly NOT do it for you. I had to set an environment variable because ssh and git couldn't seem to agree on where my .ssh directory was.