Home > Article > Development Tools > What is Gitee's SSH Key?
Gitee is a source code hosting platform that allows developers to easily manage and collaborate on code. To keep your code secure, Gitee uses SSH keys for authentication and encryption to prevent unauthorized users from accessing your code.
SSH (Secure Shell) is an encryption protocol. Through the SSH protocol, you can safely log in to a remote server or manage code in an unsecured network environment. SSH Key is a key pair used for the SSH protocol, which contains two parts: a public key and a private key.
A public key is a string of numbers and letters used to verify your identity. A private key is an encrypted file used to decrypt your messages. The corresponding decrypted message can only be obtained using the matching key.
Gitee uses SSH Key for authentication because it is very secure. SSH Key uses public key encryption technology, which is more secure than traditional usernames and passwords. Because the SSH Key is personal to you, no one can copy your authentication information from your machine. Unless someone can crack your private key, no one can obtain your authentication information from the outside.
How to create SSH Key?
First, you need to create a pair of SSH Keys on your local computer. Open the terminal and enter the following code:
ssh-keygen
Next, you will be prompted to enter the file name and password. This password is used to protect your private key. You can leave the file name as default and set a password. Please note: Passwords should be strong enough and not easily guessed.
Next, the system will generate two files for you: id_rsa and id_rsa.pub. id_rsa is your private key and cannot be shared with anyone. id_rsa.pub is your public key, you need to add it to Gitee.
How to add SSH Key to Gitee?
Next, when you clone or commit code, you need to use the SSH protocol and authenticate with your private key.
Summary
SSH Key is a secure method for Gitee authentication, which is more secure than traditional usernames and passwords. Creating an SSH Key and adding it to Gitee requires a few steps, but it keeps your code secure and your personal information protected.
The above is the detailed content of What is Gitee's SSH Key?. For more information, please follow other related articles on the PHP Chinese website!