1. Set up git users and mailboxes
git config--global user.name "Fujinzhou"
git config--global user.email "[Email protected]"
2. Generate SSH Keys
ssh-keygen-t RSA//Direct hit 3 return, the default key is placed under/root/.ssh/
3. Add SSH keys on GitHub
Cat/root/.ssh/id_rsa.pub//Copy to GitHub (settings-->ssh andgpg keys-->new ssh key), title casual
4. Test whether the certification is successful
[Email protected] data]# ssh-t [email protected]
The authenticity of host ' github.com (192.30.253.113) ' can ' t be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Is you sure want to continue connecting (yes/no)? Yes
warning:permanently added ' github.com,192.30.253.113 ' (RSA) to the list of known hosts.
Hi fujinzhou! You've successfully authenticated, but GitHub does not provide shell access.
5. Cloning code
git clone ssh://[email protected]/51reboot/actual-10-homework.git
Git pull origin master pulls code from git
Common git commands
View work status,
git status
Submit all Code
git Add.
Submit locally
git commit-m "test"
Submit to Remote
Git push Origin Master
This article from "Do not abandon!" Do not give up "blog, be sure to keep this source http://thedream.blog.51cto.com/6427769/1828437
Configuring the GitHub remote repository in a Linux environment