Check for existing keys..
ls -al ~/.ssh
So you dont have a key. Use the following steps to create one.
ssh-keygen
- Press enter when prompted with "Enter file in which to save the..."
- Press enter twice when prompted with "Enter passphrase"
- Set permissions on your keys
sudo chmod 600 ~/.ssh/id_rsa && sudo chmod 600 ~/.ssh/id_rsa.pub
- Run
`ssh-agent`
(yes including backticks) - eval
ssh-agent
ssh-add ~/.ssh/id_rsa
- View your public key
cat ~/.ssh/id_rsa.pub
- Copy your public key from above
- Add it to your github Account's SSH Keys section
- Verify that the key is setup properly
ssh -T git@githbub.com
- Say "yes" when asked if you'd like to add to known hosts
You should see your username and some message about how shell access is disabled - Exit and reopen terminal
- Run
ssh -T git@github.com
again just to ensure you can still connect to github after a restart
If you get an error about not having access when pushing a new repository try making one on github first ;)