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: