Git build trust: ways to generate SSH key

Source: Internet
Author: User

From the gitlab using SSH to pull git code error: The remote end hung up unexpected, after the investigation, is the public key generation may have problems, regenerate, and then add SSH key on the Gitlab, pull the replacement code again.


SSH keys allow to establish a secure connection between your computer and Gitla. (SSH kyes for native and code library hosts to build trust. )

Generate SSH Key

Open Git Bash.
Paste the text below, substituting in your GitHub e-mail address.

Shell

Ssh-keygen-t rsa-b 4096-c "your_email@example.com"
# Creates a new SSH key, using the provided email as a label
Generating public/private RSA key pair.


Shell


Enter a file in which to save the key (/USERS/YOU/.SSH/ID_RSA): [Press ENTER]
At the prompt, type a secure passphrase. For more information, the "Working with SSH key passphrases".

Shell

Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]

Build well, use command to view key, copy to Gitlab.

Cat ~/.ssh/id_rsa.pub

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.