[Experience sharing] GitLab configuration ssh key

  1. Open the local git bash, use the following command to generate the ssh public key and private key pair,
    ssh-keygen -t rsa -C '[email protected]'and then press Enter all the way (-C parameter is your email address)

img

  1. Then open the /.ssh/id_rsa.pub file ( representing the user directory, for example, my windows is C:\Users\Administrator), and copy the contents

  2. Open gitlab, find Profile Settings->SSH Keys->Add SSH Key, and paste the content copied in the previous step into the text box corresponding to Key, set a name for this sshkey in the text box corresponding to Title, and click Add key Button

img

  1. At this point, all the steps of gitlab configuration ssh key are completed, and we can happily use the ssh protocol to pull and submit the code.
  2. Try to pull the code and submit the code again, there should be no need to enter a password

Guess you like

Origin blog.csdn.net/weixin_44704985/article/details/113970916