Enable 1Password's SSH Agent.
Using Powershell, install npiperelay via the scoop package manager.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex # install scoop
scoop install git
scoop bucket add extras
scoop install npiperelay # install npiperelay
I continue to follow this gist into 2026!
A brief justification:
The native 1Password solution, that was meant to replace this method, sidesteps proper agent integration by utilizing WSL's inherent ability to run Windows applications directly. It actually calls upon the Windows SSH client from within WSL. This is fine for SSH alone, but if you use WSL & 1Password for git commit signing (which uses the same system we tap into here) the new approach will fail outright. The npiperelay + socat methods work perfectly in these edge cases, allowing seamless SSH and Git signing with 1Password in WSL. This is especially useful if you use the built-in WSL and Git features in Visual Studio Code. These directly run the IDE from within WSL and do not normally have access to Windows apps and services directly.
A script for Chocolatey:
As a developer, I frequently use the Chocolatey package manager for tool chains and project requirements. I was using Scoop here and here alone, but npiperelay has been available on Chocolatey for some time. Unfortunately, it doesn't work with the original
~/.bashrcscript by default. This is due to an issue with how Chocolatey's shims (what is exposed on the PATH) work within WSL. Solving this issue requires special handling from the~/.bashrcscript. We have to find and call upon the actual file instead of the usual shim found in the PATH.This new version of the
~/.bashrcscript works with npiperelay from both Chocolatey & Scoop. Pick whichever package manager you like!For Chocolatey:
choco install npiperelayFor Scoop:
scoop install npiperelayAll of the other steps from the OP are the same.