1. create a new SSH key
ssh-keygen -t rss -C “your-email-address”
save file as id_rsa_WHATEVER into ~/.ssh folder
2. attach the new key to GitHub account online
retrieve public key from ~/.ssh/id_rsa_WHATEVER.pub paste it into github “ssh public keys” section
3. tell ssh about the new key
ssh-add ~/.ssh/id_rsa_WHATEVER
if successful, response of “Identity Added”
4. Create a config file
touch ~/.ssh/config vim config
paste the following into file
|
|
5. Try it out
git init git commit -am “first commit”
login to WHATEVER account, create a new repository named “hello”
git remote add origin git@github-WHATEVER:GitHubUsername/hello.git git push origin master