Configuring multiple Sshkey under Windows git

Source: Internet
Author: User

Generate Sshkey

Ssh-keygen " [email protected] " -f filename

When the F option is not specified or the F option is empty, the generated private key and public key are: Id_rsa and id_rsa.pub

In order to connect multiple sources at the same time you need to set different names for different sources, otherwise they will be overwritten.

The ps1:windows command line has no Ssh-keygen and can be executed in Gitbash

Ps2:ssh-keygen generated key is saved by default in the ~/.ssh/directory

Add the generated sshkey to the ~/.ssh/config

Identityfile ~/. ssh/github-~/. ssh/gitlab-key

Add all the generated keys to the config file

PS1: "~/" represents the current user directory under Windows, such as ~/.ssh/represents the c:/users/yourname/.ssh/directory

Ps2:~/.ssh/config file does not exist, you need to create it manually

Set up separate User.Name and user.email for different projects

git config user.name yournamegit config user.email your [Email protected]

Configuring multiple Sshkey under Windows git

Related Article

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.