Git configures global username and password, generates ssh, and adds it to gitlab

one,

Set Git user name and email:

$ git config --global user.name "xxx"
$ git config --global user.email "[email protected]"

2. The process of generating SSH keys:
1. Check whether you already have an ssh key: cd ~/.ssh
If there is no key, there will be no such folder. If there is, backup and delete it
. 2. Survival key:

$ ssh-keygen -t rsa -C "[email protected]"

3. Just go back to the car and go down.

4. Add the ssh key on the github personal center setting, which is the public key in "id_rsa.pub".

It ends here.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325619157&siteId=291194637