Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MartinHarding/7b22e17bc38f31bd2c6ec881b6b28b61 to your computer and use it in GitHub Desktop.
Save MartinHarding/7b22e17bc38f31bd2c6ec881b6b28b61 to your computer and use it in GitHub Desktop.
Update the expiration on an expired PGP/GPG key
$ gpg --edit-key user@domain.com
gpg> key 0
gpg> expire
gpg> Changing expiration time for a subkey.
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 30
gpg> key 1
gpg> expire
gpg> Changing expiration time for a subkey.
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment