exporting always prompts for password

Ben Edwards ben at artfuldodge.io
Wed Aug 29 16:00:46 CEST 2018


Is there any way to avoid having to pass in the password each time you
do an export? I have a script that I want to use to roll the expiration
of my keys that does does something like

```
gpg2 --import "$secret"
fpr=$(gpg2 --with-colons -k | grep fpr | head -n1 | cut -d':' -f10)
gpg2 --quick-set-expire "$fpr" 1y
gpg2 --quick-set-expire "$fpr" 1y '*'
gpg2 --armor --export-secret-keys "$fpr" >"$secret"
gpg2 --armor --export-secret-subkeys "$fpr" >"$secret_subs"
gpg2 --armor --export "$fpr" >"$public"
```
where `$secret` is a path to some armored backup of my keys.I would very
much like it if I could adjust my invocations such that I am able 1) use
a standard pinentry program and 2) only enter the password once. I have
a working agent setup.

Is such a thing possible?

Best,
Ben

NB: I am well aware that the code that grabs the fingerprints is a bit
janky. This is a work in progress.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180829/22b00924/attachment.sig>


More information about the Gnupg-users mailing list