Use TortoiseGit to add SSH keys to the github account to solve the problem that pull always prompts you to enter the password. tortoisegitgithub
Every time you synchronize or upload code to the code library on githun, you need to enter the user name and password each time. In this case, you can set the SSH key to save the trouble. If TortoiseGit is used as a local github management tool, TortoiseGit uses a key with the ppk extension instead of an rsa key generated by ssh-keygen. That is, keys generated using ssh-keygen-C "username@email.com"-t rsa cannot be used in TortoiseGit. However, github-based development requires the use of rsa keys. Therefore, the putty key generator tool of TortoiseGit is required to generate ppk keys that are applicable to both github and TortoiseGit.
Method/step
-
Open PuttyGen under TortoiseGit and click Generate in the window to Generate a green progress bar. During the generation process, you can move your mouse to increase randomness.
-
All the generated content is copied after generation, and the window will not be closed.
-
Log on to github, click the setting chart in the upper-right corner, go to the setting page, select the SSH key in the options on the left, and click Add SSH key. On the displayed page, enter the SSH key name, just enter what you like and paste the copied content into the key and click add key.
-
Return to the second step, and click Save private key to Save the private key extension for TortoiseGit as. ppk.
-
Run the Pageant program in the TortoiseGit Start Menu. After the program is started, it will be automatically docked in the taskbar. Double-click the icon to bring up the key management list.
-
Click add key in the pop-up key management list to add the private key (. ppk) file saved in step 1. Close the dialog box.
After the above configuration, you can use TortoiseGit for push and pull operations. You do not need to enter the password every time.