Export Secret Key (FOR BACKUP, NEVER DISCLOSE IT) gpg --output private.pgp --armor --export-secret-key username@email IMPORTANT! IF IMPORT DOES NOT WORK, JUST ADD THIS PARAMETER (tested, working!): --pinentry-mode loopback --------------------------------------------- Further info: After extending the expiry date of a GPG key you might have to copy your key to another machine to use the same key there. Here is how: Identify your private key: gpg --list-secret-keys user@example.com Example output: pub 4096R/ABC12345 2020-01-01 [expires: 2025-12-31] uid Your Name sub 4096R/DEF67890 2020-01-01 [expires: 2025-12-31] Remember the ID of your key (second column, after the slash, e.g. "ABC12345"). If you have a "sub" entry, you can ignore it. Run this command to export your key: gpg --export-secret-keys YOUR_ID_HERE > private.key Copy the key file to the other machine using a secure transport (scp is your friend). To import, run gpg --import private.key If the key already existed on the second machine, the import will fail saying "Key already known". To force import, you will have to delete both the private and public key first (gpg --delete-keys and gpg --delete-secret-keys)