Gitlab Add SSH Key

Source: Internet
Author: User
Tags word wrap

The computer installed a virtual machine, want to establish a secure SSH connection with Gitlab, the steps are as follows

1. Native SSH key generation

System Environment: Linux

Log in with the root user, execute the command: ssh-keygen-t rsa-c "[email protected]", the default carriage return is OK, the command will create a hidden. SSH folder with 2 files in the folder: Id_rsa (private key) and id_ Rsa.pub (public key), use command: VI id_rsa.pub to view public key contents, copy public key contents.

2.gitLab Add SSH Key

3. Authorization

chmod ~/.ssh/id_rsa (only master has read and write access)

chmod ~/.ssh (only master has read, write, execute permission)

4. Problems and Solutions encountered:

Problem: Add SSH key times error in Gitlab:

Key is invalid

Fingerprint cannot be generated

Solution: This problem occurs because some content is automatically wrapped, resulting in the inability to pass the check, delete word wrap, delete the word wrap after the key such as:

Add success:

Gitlab Add SSH Key

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.