GPG-PRESET-PASSPHRASE(1)
π GPG-PRESET-PASSPHRASE π
okay so bestie, welcome to the gpg-preset-passphrase page β part of the GNU Privacy Guard 2.4 fam. buckle up π
β¨ NAME β¨
gpg-preset-passphrase β put a passphrase into gpg-agent's cache π§
πΈ SYNOPSIS πΈ
gpg-preset-passphrase [options] [command] cache-id
π¦ DESCRIPTION π¦
so gpg-preset-passphrase is literally this little utility that seeds the internal cache of a running gpg-agent with passphrases. that's the whole gig. π
it's mainly useful for unattended machines, like where the usual pinentry tool may not be used and the passphrases for the keys you're gonna use are given at machine startup. no humans, just vibes β¨
this program works with GnuPG 2 and later. GnuPG 1.x is not supported β she does not know her, she does not see her π«Ά
ngl the passphrases you set with this utility don't expire unless the --forget option is used to explicitly clear them from the cache β or gpg-agent is either restarted or reloaded (by sending a SIGHUP to it). rude but okay π
heads up bestie: the maximum cache time as set with--max-cache-ttlis still honored. and you gotta allow this passphrase presetting by startinggpg-agentwith the--allow-preset-passphrase. no permission, no preset, periodt π
gpg-preset-passphrase is invoked this way:
gpg-preset-passphrase [options] [command] cacheid
so cacheid is either a 40 character keygrip of hexadecimal characters identifying the key for which the passphrase should be set or cleared. that's a lot of hex, but she's worth it π
the keygrip is listed along with the key when running this command:
gpgsm --with-keygrip --list-secret-keys
alternatively, an arbitrary string may be used to identify a passphrase β it is suggested that such a string is prefixed with the name of the application (e.g. foo:12346). main character naming energy fr fr π
scripts should always use the option --with-colons, which provides the keygrip in a "grp" line (cf. doc/DETAILS).
π COMMANDS β you must pick one, no skipping π
one of the following command options must be given:
--presetβ preset a passphrase. this is what you usually will use, lowkey the default bestie.gpg-preset-passphrasewill then read the passphrase fromstdin. π--forgetβ flush the passphrase for the given cache ID from the cache. she's gone, she's deleted, no cap π¦
π OPTIONS β the bonus round π
the following additional options may be used:
-v,--verboseβ output additional information while running. she's chatty and we love that π£οΈβ¨-Pstring,--passphrasestring β instead of reading the passphrase fromstdin, use the supplied string as passphrase.
β οΈ bestie READ THIS: note that this makes the passphrase visible for other users. like actually visible. on the machine. to other people. if that's not the vibe, pipe it through stdin instead ππ
π SEE ALSO π
gpg(1), gpgsm(1), gpg-agent(1), scdaemon(1)
the full documentation for this tool is maintained as a Texinfo manual. if GnuPG and the info program are properly installed at your site, the command
info gnupg
should give you access to the complete manual including a menu structure and an index. iconique π
that's the whole page bestie, go preset some passphrases responsibly π«Ά this was GnuPG 2.4.9, dated 2025-02-19 β catch you on the next manpage, mwah πππ¦
π¦ where this page comes from
- alpine 3.22: gnupg-doc 2.4.9-r0 Β· GPL-3.0-or-later
- alpine 3.23: gnupg-doc 2.4.9-r0 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms