How does git generate keys?

Today I will share with you a git generation key and configuration method~~~~~~~~~~~~
First of all, open git bash (provided that after downloading git)

 cd ~/.ssh/

what's next

 git config --global user.name "xxx"

Then

git config --global user.email "你的邮箱"

continue

ssh-keygen -t rsa -C "你的邮箱"

As shown in the figure,
insert image description here
insert image description here
find the file according to the path, open it with Notepad, copy it, go to gitLab, click Settings in the upper right corner of the avatar, as shown in the figure,
insert image description here
click on the SSH keys in the left menu bar and paste the copied directly into it
insert image description here
and click Add key to add it successfully La~ you can check it out below,
insert image description here
thank you~~~~~~~~~~

Guess you like

Origin blog.csdn.net/weixin_44237840/article/details/116052306