How to github ssh public key under windows

1. Install git, open "Git Bash" from the program directory 
2. Type the command: ssh-keygen -t rsa -C "[email protected]"
  "[email protected]" is the github account
3. Remind you to enter the name of the key, such as id_rsa
4. Generate two files under C:\Documents and Settings\Administrator\: id_rsa and id_rsa.pub
5. Copy the key file generated in 4 to the C:\Documents and Settings\Administrator\.ssh\ directory.
6. Open the id_rsa.pub file with Notepad, copy the content, go to the ssh key management page on the github.com website, add a new public key, choose a name, and paste the content just now
 
just copied content.
7. ^_^ OK
 
It should be noted that the key file generated in step 2 is in the root directory of the current user, and these two files must be placed in the ".ssh" directory of the current user directory to take effect.
In Windows, you can only create folders starting with "." on the command line. The command is mkdir .ssh

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326348024&siteId=291194637