git SSH key deletion and creation (git ssh forgot password what to do?) )

Source: Internet
Author: User
Tags ssh
Objective

If you set a password before you created SSH, it's very likely that the git operation has a forgotten password. How to solve this situation. Workaround

In this case do not think about how to re-modify the password, choose to re-create an SSH key, (PS: According to the investigation is git to ensure security does not have the option to re-modify the password).

Let's first check if there is ssh locally. Use:

CD ~/.ssh

Enter the. SSH folder
LS View all files.
If there is a local SSH key, there will be id_rsa.pub,config,known_hosts and other files. If there is no SSH on the local CD ~/.ssh This step may be unable to find a file hint.
The next is to create a new ssh. The command is as follows:

Ssh-keygen-t rsa-b 4096-c "your_email@example.com"

If you have SSH locally, you will see the following prompt:

Choosing Y here means overwriting the local SSH key, which is the meaning of the SSH key deletion.
Next is to let you enter the password, we have forgotten the password experience, this time we create SSH do not enter the password, we directly press ENTER.

The next thing is to post the created secret key to the SSH and GPG keys in Settings, GitHub.

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.