Skip to content

Instantly share code, notes, and snippets.

View dwlocks's full-sized avatar

Daniel Locks dwlocks

View GitHub Profile
@matthiasr
matthiasr / gpg_wsl2.md
Last active March 30, 2025 10:58
GPG signing with full gpg-agent support in WSL2: the easy way

Problem statement

Signing with GPG in Windows System for Linux (WSL2) does not work smoothly out of the box. Notably, when using a TTY-based pinentry, signing in Visual Studio Code does not work at all.

Solution

  1. Install Gpg4Win: winget install -e GnuPG.Gpg4win or download and install manually
  2. Start Kleopatra and generate or import keys
  3. Insert links to gpg.exe inside of WSL: