Skip to content

Instantly share code, notes, and snippets.

@adamelliotfields
Last active February 16, 2026 19:42
Show Gist options
  • Select an option

  • Save adamelliotfields/5d1f4937d53ecfb63911ffa8a41bef75 to your computer and use it in GitHub Desktop.

Select an option

Save adamelliotfields/5d1f4937d53ecfb63911ffa8a41bef75 to your computer and use it in GitHub Desktop.
Fix GnuPG Slow Commit Signing on Windows

Historically, GnuPG stored keys in a flat file (pubring.gpg). Modern versions moved toward keyboxd, a background SQLite-based daemon.

When you run a command like git commit or gpg --list-keys, Windows has to do a bunch of things, and for whatever reason those things are slow.

To shift this work to login time:

  1. Open Task Scheduler
  2. Click Create Task and give it a name
  3. Add the At log on trigger
  4. Add an action to Start a program with powershell.exe and the arguments:
-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "$ErrorActionPreference='SilentlyContinue'; $env:Path=(Join-Path $env:ProgramFiles 'GnuPG\bin') + ';' + $env:Path; gpgconf --launch keyboxd; gpg-connect-agent /bye;"

See gpg(1), gpgconf(1), and gpg-connect-agent(1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment