2023 gitlab added ssh key

The gitlab has been built above. When creating a new project, it prompts that an ssh key is required to use it. Here is a record of how to generate ssh key, which has been added to gitlab

  • Generated on the computer ssh key, here you have installed the git tool by default
  • OpenGit Bash Here
    insert image description here
  • Input ssh-keygen, the following prompts can be entered without input.
    insert image description here
    The following is the case of input
    insert image description here
  • Find the file directory of the generated key. I didn’t enter anything here. It is in the default directory of the C drive user. If the directory is entered, it will be in the corresponding directory.
    insert image description here
  • Add ssh key, click the account in the upper right corner, select Preferences–>SSH Keys
  • Use Notepad to open the public key file id_rsa.pub , use the Ctrl+A keys to select all the public key content, and copy the content of the public key file and paste it into the key box of GitLab's SSH Keys, as shown in the following figure:
    insert image description here
  • The addition is complete. Add the SSH public key to the GitLab server (indicating that the public key added to GitLab by this computer is complete, and the GitLab server already trusts the computer 从本电脑上推送、拉取GitLab上的项目文件都不用密码了)
    insert image description here

Guess you like

Origin blog.csdn.net/qq_31424825/article/details/128559115