Unlock the login keyring at login and keep the GPG passphrase cached #108

Open
opened 2026-08-23 15:46:34 +01:00 by joshquinlan · 1 comment
Owner

Every login shows a keyring-not-unlocked message and gpg asks for the passphrase again on the first signed commit. Diagnose which keyring (gnome-keyring secrets via PAM, or the GPG agent cache) is not unlocked by the greeter: wire pam_gnome_keyring into the login and greeter PAM stack (tuigreet/greetd) so the login password unlocks it, start gnome-keyring-daemon in the session with the secrets component, and set gpg-agent default-cache-ttl and max-cache-ttl to session length with the passphrase stored in the keyring via pinentry; confirm with a signed commit after a fresh login.

Every login shows a keyring-not-unlocked message and gpg asks for the passphrase again on the first signed commit. Diagnose which keyring (gnome-keyring secrets via PAM, or the GPG agent cache) is not unlocked by the greeter: wire pam_gnome_keyring into the login and greeter PAM stack (tuigreet/greetd) so the login password unlocks it, start gnome-keyring-daemon in the session with the secrets component, and set gpg-agent default-cache-ttl and max-cache-ttl to session length with the passphrase stored in the keyring via pinentry; confirm with a signed commit after a fresh login.
Author
Owner

Diagnosed and built on the keyring branch (b74ac4e), awaiting a decision before it goes on master. Neither keyring is broken: greetd already runs pam_gnome_keyring, but system-auth puts pam_fprintd first as sufficient, so a fingerprint login never hands a password to the keyring (journal: "gkr-pam: no password is available for user", grantors=pam_fprintd). The fix in install/25-keyring switches the greeter stack to password-auth, which means typing the password at tuigreet instead of a finger; sudo and polkit keep the reader. No third option exists with authselect. gpg-agent already caches for 28800 s; the first signed commit of a session prompts once by design, now through the Donbox pane. Say here whether to take the trade-off.

Diagnosed and built on the keyring branch (b74ac4e), awaiting a decision before it goes on master. Neither keyring is broken: greetd already runs pam_gnome_keyring, but system-auth puts pam_fprintd first as sufficient, so a fingerprint login never hands a password to the keyring (journal: "gkr-pam: no password is available for user", grantors=pam_fprintd). The fix in install/25-keyring switches the greeter stack to password-auth, which means typing the password at tuigreet instead of a finger; sudo and polkit keep the reader. No third option exists with authselect. gpg-agent already caches for 28800 s; the first signed commit of a session prompts once by design, now through the Donbox pane. Say here whether to take the trade-off.
Sign in to join this conversation.
No description provided.