Issue on adding SSH key to GitHub
Simply follow these steps and you will set up your SSH key in no time:
Generate a new ssh key (or skip this step if you already have a key)
ssh-keygen -t rsa -C "your@email"
Once you have your key set in
home/.ssh
directory (orUsers/<your user>.ssh
under windows), open it and copy the content
How can I add the SSH key to the GitHub account?
Login to the GitHub account
Click on the rancher on the top right (Settings)
Click on the SSH keys
Click on the Add SSH key
Paste your key and save
And you are all set to go :-)
If you are using a Mac and are typing out GitHub's instructions (e.g. Generating a new SSH key and adding it to the ssh-agent, you're probably typing and only tabbing (e.g. auto-completing) to:
$ pbcopy < ~/.ssh/id_rsa
and not
$ pbcopy < ~/.ssh/id_rsa.pub
With the former you're actually copying, and trying to paste your private key.
I hope that saves you some time.
Another way to copy the public key to the clipboard:
clip < ~/.ssh/id_rsa.pub
ssh-keygen
will generate you a pair of keys, one private and one public. It sounds like you uploaded the wrong one. GitHub wants the public key, typically here: ~/.ssh/id_rsa.pub
.