5.8 Setting Up GitHub & SSH Keys


SSH KYES

References:


Check whether you have a SSH key
ls -al ~/.ssh


Generate a SSH Key
ssh-keygen -t rsa -b 4096 -C [YOUR EMAIL]
Hit enter for three prompts.
ls -al ~/.ssh checks if it exsits

-rw-r--r-- 1 EDU+x85gao 4096 3243 Aug 3 16:00 id_rsa
-rw-r--r-- 1 EDU+x85gao 4096 745 Aug 3 16:00 id_rsa.pub

Start up SSH Agent
eval "$(ssh-agent -s)" Starts SSH Agent Program.
ssh-add ~/.ssh/id_rsa informs the local machine of this private key.


Configure GitHub
Settings -> SSH and GPG keys -> New SSH Key

Title: computer identifier(recommended)


Copy Contents in id_rsa.pub
Paste it into the Key.


Test Connection
ssh -T git@github.com

$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Hi gaojude! You've successfully authenticated, but GitHub does not provide shell access.

If you see this message, you are done!


Create a new repository: node_web_server
Add a new Remote: git remote add origin [Address]
Push commits: git push -u origin master


Wiki: instructions of using your repository