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.

Attachment: pgpfq1g6kRR2P.pgp
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to