Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lovejavaee/4b870ad7fbc735df5245bf996bbd9c11 to your computer and use it in GitHub Desktop.
Save lovejavaee/4b870ad7fbc735df5245bf996bbd9c11 to your computer and use it in GitHub Desktop.
GPG, Change email
From http://pgp.mit.edu/faq.html:
You cannot delete keys nor modify UIDs for keys uploaded to PGP key servers.
To change your email, you must add a new UID.
$ gpg --edit-key <keyID>
gpg> adduid
Real name: <name>
Email address: <email>
Comment: <comment>
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a passphrase to unlock the secret key for
user: "foo <foo@bar.com>"
Update the trust level of the new UID.
-----------------------------------------------------
gpg> uid <new uid number>
gpg> trust
Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
gpg> uid <new uid number>
Revoke the old UID.
-----------------------------------------------------
gpg> uid <old uid number>
gpg> revuid
Really revoke this user ID? (y/N) y
Your decision? 4
Enter an optional description; end it with an empty line: <description>
Is this okay? (y/N) y
Save the changes. Upload the updated key to your PGP key server.
-----------------------------------------------------
gpg> save
$ gpg --keyserver hkp://pgp.mit.edu --send-keys <keyID>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment