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