Install git under Windows
1. Download Git https://git-for-windows.github.io/
2. Installation
Installation: Click Next
In the "Configuring the Line Ending Conversions" option,
First option: If it is a cross-platform project, install in Windows system, select;
Second option: If it is a cross-platform project, install in Unix system, select;
Third option: Non-cross-platform project, select.
Right-click on Git Bash to use it after installation is complete
Installing the Tortoisegit git client tool
1 Downloads https://tortoisegit.org/download/
Select the location of the installation next
Download and install language Packs Language pack below
Git manages multiple SSH keys
Configuration generation for multiple local SSH keys
1 Configuring a GIT user name and password
git config user.name "Your user name"
git config user.email "youremail@email.com"
2 specifying the saved file name when SSH key is generated
Ssh-keygen-t rsa-f ~/.ssh/id_rsa.github-c "youremail@email.com"
The Id_rsa.gihub and id_rsa.github.pub two files will be generated in the ~/.ssh directory after you finish specifying
Id_rsa.github.pub is the key that we're adding to the server.
Modifying a configuration file
Create a new config file under the ~/.ssh directory
Add content
# Gitlab
Host gitlab.com
HostName gitlab.com
Preferredauthentications PublicKey
Identityfile ~/.ssh/id_rsa
# GitHub
Host github.com
HostName github.com
Preferredauthentications PublicKey
Identityfile ~/.ssh/id_rsa.github
Test
$ ssh-Tgit@github.com
Tips for Success:
Hi user! You ' ve successfullyauthenticated, but GitHub does not provide shell access.
$ ssh-t git@gitlab.com
Tips for Success:
Welcome to GitLab, user!