- First, the Windows computer needs to download and install git:
Download and install directly from the official website: https://git-scm.com/download/win
- add public key
ssh-keygen -t rsa -C "[email protected]"
Note: This [email protected]
is consistent with the email address registered by github
Then press Enter all the way, the generation is complete
Enter in the console:
start .
Open the file browser, there is a folder under the current path .ssh
:
there will be two files after opening:
- id_rsa: private key, do not copy to other places
- id_rsa.pub: public key, you can copy the content to github for authentication
Use notepad or vscode to open id_rsa.pub
the file, copy the content inside, go to github, find in the settings: add ssh key
, then paste it in and save it
- Use git locally
Just enter the git command directly on the command line, and operations such as push and pull do not need to be verified