Pageant saves you a lot of hassle with SSH keys by running in the background and hooking into ssh sessions run by PuTTY’s ssh client. After installing git, all you have to do is add a environment variable pointing to the plink.exe file in the PuTTY directory and restart. If you don’t have Putty, download it here.

To add the environment variable, you need to open System Properties and then choose “Advanced system settings”. Then click “Environment Variables” at the bottom. In the “System variables” section, hit “New…”. 

Name: GIT_SSH

Value: C:\Program Files (x86)\PuTTY\plink.exe

Change to location of where you installed PuTTY.

Unfortunately, at this point I had to restart my computer for git to start using plink. Before you can actually connect to your remote server, you must connect to it in PuTTY and accept the signature. Open PuTTY type in the hostname (github.com) and leave everything else at the defaults. Then click “Open” and when prompted click “Yes”. Then you can close the new window it opened and you’re good.

To actually use Pageant. Launch it via the Start Menu (Putty -> Pageant) and then in the taskbar find the little computer icon and hit “Add key”. Then add your PuTTY private key. If your private key is not a PuTTY private key, open it in PuTTYGen (Conversions -> Import) and then save it as a private key (with extension .ppk). That should be it!

If you’re server uses a port besides 22, then you need to configure it in %USERPROFILE%.ssh\config. Add something like:

Host myownhost.com

        User git

        Port 220

blog comments powered by Disqus