Create an SSH Key to connect to GitHub or GitLab

Source: Internet
Author: User

Create an SSH Key to connect to GitHub or GitLab

When we clone a project from GitHub or GitLab or participate in a project, we need to prove our identity. One possible solution is to add the account name and password to each access, and save a unique key locally, you can also save this key in your account and include it when you access it. GitHub and GitLab use keys to verify your identity and use RSA Algorithms to generate this key.

Link Method

First, you need to have an account on github or gitlab.

Open git bash and enter the command ls-al ~ /. Ssh.

Check whether id_rsa.pub or id_dsa.pub exists. If yes, skip step 1.

In git bash, type ssh-keygen-t rsa-C "your_email@example.com" and replace the email address with your own. After the following output is displayed,

Press enter all the time. Then it is displayed as follows:

Here we can see that the id_rsa and id_rsa.pub files have been generated. The generated path is also displayed.

Open the id_rsa.pub file with notepad and copy all the content.

Open the SSH key tag in your gitlab or github account.

Select the Add SSH key button, paste the copied content, and click add key.

After all the operations are completed, as long as you have permissions for the project you want to operate on, you can perform git operations smoothly.

Deploy GitLab on CentOS (self-managed Git project repository)

Install GitLab 6.0.2 on RHEL6/CentOS6/ScientificLinux6

CentOS 6.5 GitLab installation tutorial and Related Problems

Enable the SSH service to allow Android phones to remotely access Ubuntu 14.04

How to add dual authentication for SSH in Linux

Configure the SFTP environment for non-SSH users in Linux

Configure and manage the SSH service on Linux

Basic SSH tutorial

Linux SSH command instance Guide

GitLab details: click here
GitLab: click here

This article permanently updates the link address:

Related Article

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.