Windows7 Environment: Git SSH Create key step

Source: Internet
Author: User

When we use a warehouse such as GitHub to pull a replacement code, it may require SSH authentication, so we need to generate a local SSH key.

So how to generate SSH key??

1, first to install the Git tool (previous: Git installation steps)

2. Right mouse, check "Git Bash here" or open it in Windows "start"---> "so program" or install directory;

3. Enter the. SSH folder

Command: CD ~/.ssh/

If you are prompted with "No such file or directory", the. ssh folder does not exist, you need to create one manually;

Command: mkdir ~/.ssh

4, configure the global name and email, here is your GitHub or bitbucket name and email

$ git config--global "Your name"
$ git config--global "[Email protected]"

5. Generate key

Ssh-keygen-t rsa-c "[email protected]"

Press three times in succession, the password set here is empty, and the key is created;

Finally, two documents were obtained: Id_rsa and;

6. Open the Suwy directory, enter the. SSH folder, open the with Notepad, copy the contents of the content to your github, and SSH setup is complete.

Because I use the Gerrit, so add ssh location here:

7, self-detection add key is successful

Is Git clone a Gerrit on the project, see whether can clone down, can demonstrate success.

Windows7 Environment: Git SSH Create key step

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: 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.