A silent, infuriating stall. If you’ve hit the GPG Linux terminal bug, you know exactly what that means. Commands that should run in milliseconds hang indefinitely. Passphrases don’t prompt. Scripts break. CI pipelines crumble.
This bug is not new, but its bite is sharper in modern workflows. On Linux, GPG can lock up when terminal input/output handling collides with agent configuration. It often appears when running commands over SSH, inside containers, or through automation where no TTY is available.
What’s really going on
The root cause often comes down to how gpg-agent expects to handle passphrase input. If pinentry can’t attach to an interactive terminal, GPG will wait forever. Some distributions default to graphical pinentry programs, others to curses-based ones. Mismatches between systemd user services, environment variables, and TTY allocation can trigger the stall.
Common triggers for the GPG Linux terminal bug
- Running
gpg --decryptorgpg --signin headless scripts - CI/CD jobs without a proper TTY
- SSH sessions without
AllowAgentForwardingconfigured - Containers missing
pinentryor locale packages - Conflicts between system
gpg-agentand manually launched ones
When debugging, always start by inspecting