Prints a warning when GPG keys are about to expire, and optionally helps extend their validity time.
$ exec bash
The following GPG keys will expire soon:
2C7D8465F19C3CDC26237087BFD86BE9948C849A: 5 days
57E0FE20CF9F7BF57769909C0252D762936969DD: -20 days
Build and install using cargo
:
$ cargo install gpg-expire-warner
Add something like this to your shell startup script (.bashrc
or similar):
gpg-expire-warner --days 14 \
"2C7D8465F19C3CDC26237087BFD86BE9948C849A" \
"0E70A5BEFD6E37F6EC272A025A5B6A61618EA60D" \
"57E0FE20CF9F7BF57769909C0252D762936969DD"
When it's time to extend validity time, you can add --extend <expire>
to
the command to automatically invoke gpg
to extend the validity of each key
about to expire:
``` $ gpg-expire-warner --days 14 \ "2C7D8465F19C3CDC26237087BFD86BE9948C849A" \ "0E70A5BEFD6E37F6EC272A025A5B6A61618EA60D" \ "57E0FE20CF9F7BF57769909C0252D762936969DD" \ --extend 1y
The following GPG keys will expire soon: 2C7D8465F19C3CDC26237087BFD86BE9948C849A: 5 days 57E0FE20CF9F7BF57769909C0252D762936969DD: -20 days Extending validity of these keys by: 1y ```
<expire>
may be any expiry time format recognized by gpg --quick-set-expire
.
Move on and do better things than worry about your GPG keys expiring.
GNU General Public License, version 3 or later.