Renew GPG key
Once your key is expired, you need to renew your key in order to use it again.
Your master key has two part: [SC] and [E], the sign+certify and encrypt keys. You need to renew both.
First check your master key by the following command.
$ gpg -K
Here is output:
[keyboxd]
---------
sec rsa3072 2024-01-01 [SC] [expires: 2025-01-01]
<KEYID>
uid [ultimate] John Snow (Targaryen) <example@mail.com>
ssb rsa3072 2024-01-01 [E] [expires: 2025-01-01]
Here the key is created on 2024-01-10 and expire a year later. Now let’s renew this key for another year.
$ gpg --edit-key <KEYID>
gpg> expire
(choose the expire duration you want)
gpg> key 1
gpg> expire
(repeat again)
gpg> save