Skip to content

Instantly share code, notes, and snippets.

View RafaelWO's full-sized avatar
🤔
thinking...

RafaelWO

🤔
thinking...
  • Salzburg, Austria
  • 23:15 (UTC -12:00)
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:
import datetime
import sys
from typing import Optional
import colorama
import pyramid.config
from loguru import logger
from pyramid.request import Request
from pyramid.response import Response