1, the approximate process:
Installing the GIT Client tool
Locally generated key pair;
Set the public key on GitHub or Gitlab;
Modify git's remote URL as git protocol (HTTPS is not recommended)
git uses the HTTPS protocol, each pull, push to enter a password, Using the GIT protocol, SSH keys are used. You can save the password every time, but be sure to keep your own key, pay attention to security.
1.1) locally generated key pair;
Ssh-keygen-t rsa-c "Your Mailbox"
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8A/EE/wKiom1g_g5eS3bLlAAAcoXN3QXY907.png-wh_500x0-wm_3 -wmp_4-s_3177393652.png "title=" 1.png "alt=" Wkiom1g_g5es3bllaaacoxn3qxy907.png-wh_50 "/>
Note the arrow key storage location and password
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/EA/wKioL1g_g32RHnAwAABfZHtRt50157.png-wh_500x0-wm_3 -wmp_4-s_2918805156.png "title=" 2.png "alt=" Wkiol1g_g32rhnawaabfzhtrt50157.png-wh_50 "/>
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/EE/wKiom1g_hICweKXNAAA9ucyUnSo645.png-wh_500x0-wm_3 -wmp_4-s_2736192593.png "title=" 1.png "alt=" Wkiom1g_hicwekxnaaa9ucyunso645.png-wh_50 "/>
1.2) Set the public key on GitHub or Gitlab;
GitHub: Register, login, find Ssh-key, add a public key to
ssh-t [email protected] Test
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/EE/wKiom1g_hOTQZnI6AABHbEKYFMg569.png-wh_500x0-wm_3 -wmp_4-s_2231881890.png "title=" 2.png "alt=" Wkiom1g_hotqzni6aabhbekyfmg569.png-wh_50 "/>
GItLab:
Environment building, adding public key
ssh-t [email protected] test (similar test method)
1.3) modify git's remote URL as a git protocol (HTTPS is not recommended) and simple to use.
git help using Git
git remote-v how to view support
git remote Set-url setting access mode
To add a remote repo:
$ git remote add upstream git://github.com/xxx/xxx.git
To rename a remote repo:
$ git://github.com/xxx/xxx.git to "upstream"
Cloning:
$ git clone
Warehouse initialization:
Git init
Generate a snapshot and deposit the project index:
git add
Files, and git rm,git mv, etc.
Project Index submission:
Git commit
This article is from the "Ningzhiyuan 51CTO blog" blog, be sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1878377
Git SSH key generation and detection process!