How to Setup Git with PuTTY and Pageant (My Way...)
This is a short guide how to setup Git SSH access using PuTTY.
1. Install PuTTY #
2. Generate a public/private key using PuTTYgen
#
Saving the private key saves both the public and the private key in a *.PPK
file.
Bonus Hint 1: Saving keys in Microsoft OneDrive or another cloud folder makes them easily available on any computer.
Do not close the PuTTYgen
window yet.
3. Add public key to your Git provider #
The following screen captures are for GitHub but the process is similar for Bitbucket or other providers.
In your account settings, go to “SSH and GPG keys” and select “New SSH Key”
Copy the public key from the PuTTYgen
window to the GitHub window:
Now your list of SSH keys should contain the newly added key:Bonus Hint 2: If you don’t want to save your keys with a cloud provider you can create separate key for each computer and add them all to your Git account.
You can now close the PuTTYgen
window.
4. Load Pageant keys at startup #
Add a shortcut to Pageant to your startup folder. Hit + R and type “shell:startup” in the Run Dialog:In the startup folder create a shortcut to pageant.exe
Change the startup folder to the folder where you saved the *.ppk
file and add the name of the key file to the command line. If you have more than one key to load, separate file names with spaces:
5. Install Git #
These screen captures are just those where I changed settings from their default values. Not all those changes are required but most are nice to use.
Now, this one is important:
6. Test #
Check that you can clone a repository (any repository will do):