git remote connection gitee/github

git remote connection process gitee/github

1. Create SSH Key

View the user's home directory:

windows——C:\Users\xxx

linux—— ~

Is there a .ssh folder? If so, check if there is one in this directory:

id_rsa : private key

id_rsa.pub : public key

If there are two files, you can go to the second step directly, otherwise open the Shell and create an SSH Key (about SSH ):

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

According to man ssh-keygen:

ssh-keygen command: key generation, management, conversion for identity authentication

-t parameter: used to specify the type of generated key, including dsa | ecdsa | ed25519 | rsa | rsa1, where rsa1 means protocol version 1, and the rest are protocol version 2.

-C : followed by a comment


2. Add the content of the public key file to the gitee/github account

Take gitee as an example: Personal avatar in the upper right corner - Settings - SSH public key under security settings in the left column

The title is self-made, copy the content of id_rsa.pub into the public key text box.

Guess you like

Origin blog.csdn.net/weixin_43869409/article/details/131109952