The role of public key in Git is to encrypt the contents of the transfer.

Source: Internet
Author: User

It is well known that SSH is a cryptographic transmission.

There are many algorithms for encrypting transmission, GIT can use Rsa,rsa to solve a core problem is how to use a pair of specific numbers, so that one of the numbers can be used for encryption, and another number can be used to decrypt. These two numbers are the public key that you encounter when you use Git and GitHub, which is also the private key.

Where the public key is the number that is used to encrypt, which is why you have to upload it to GitHub after the local public key is generated. Sent back from the GitHub, with the public key encrypted data, you can use the local private key to restore.

If your key is lost, whether it's a public key or a private key, you can't use the missing one, the solution is simple, regenerate again, and then set it again in the github.com.

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.