Skip to content

Instantly share code, notes, and snippets.

@connorshea
Last active January 26, 2022 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save connorshea/69b14427239a942db45a125709cdc610 to your computer and use it in GitHub Desktop.
Save connorshea/69b14427239a942db45a125709cdc610 to your computer and use it in GitHub Desktop.
Renewing your GPG Key

See here: https://www.g-loaded.eu/2010/11/01/change-expiration-date-gpg-key/

  • Need to figure out your key ID (check the recent commits you've made on GitHub, probably? Or use gpg --list-secret-keys --keyid-format LONG)
  • gpg --edit-key ID_GOES_HERE
  • expire
  • Set the expiration to whenever (1 year is probably fine)
  • save
  • Check gpg --list-keys and gpg --list-secret-keys to make sure the keys now have updated dates.
  • Delete the existing key (for work, you probably only have the one that's associated to your work email) in your GitHub GPG settings and re-generate a public key with gpg --armor --export KEY_ID_HERE. (If you try to upload the newly-renewed key without deleting the old key, GitHub won't let you upload it.)
  • Use that new public key to create a new key in GitHub's GPG settings.
  • Everything should be gucci now, hurray!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment