Use as Git SSH client

This is advantageous over Microsoft's attempt at porting OpenSSH as the builds currently shipping with Windows contain a four year old bug which prevents performing Git operations on larger repositories.

Launch File Explorer and browse to shell:startup. Create a new shortcut and paste the target C:\Program Files\PuTTY\pageant.exe. Give the shortcut the name Pageant. Right click it and choose Properties, then append the following parameters:

  • --openssh-config %USERPROFILE%\.ssh\pageant.conf to have it write an SSH configuration with an IdentityAgent directive for the Windows named pipe.
  • --unix %USERPROFILE%\.ssh\agent.sock to have it write a Unix socket for WSL1.
  • --encrypted %USERPROFILE%\.ssh\id_ed25519.ppk (or equivalent, per your identity names) to have it load your key files.

Next, for each Git host you're connecting to, invoke plink for them and accept host keys. Unfortunately you won't be able to do this for Git invocations.

Now configure Git to use this SSH client with a user environment variable:

[System.Environment]::SetEnvironmentVariable("GIT_SSH", "C:\Program Files\PuTTY\plink.exe", "User")

Backlinks