Skip to content

Instantly share code, notes, and snippets.

@wdhowe
Last active February 3, 2024 20:59
Show Gist options
  • Save wdhowe/52cbca2c7788c679ae9b9175e7531bf3 to your computer and use it in GitHub Desktop.
Save wdhowe/52cbca2c7788c679ae9b9175e7531bf3 to your computer and use it in GitHub Desktop.
Renew Expired GPG Key

Extend your GPG key expiry

  • Find the ID of the expiring key. Note your key ID.

    gpg --list-secret-keys
  • Start editing the key.

    gpg --edit-key KEY_ID
  • View your selected key and subkeys

    gpg> list
  • Select the primary key

    gpg> 0
  • Interactively select a new expiry. You'll probably have to unlock your key with its passphrase.

    gpg> expire
  • Select the primary subkey and repeat the previous expire step.

    gpg> 1
  • Inspect the resulting expiries

    gpg> list
  • Save when you're done.

    gpg> save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment