Select all UIDs you want to remove (probably all but the newly created one): gpg> uid 1Īnd repeat as needed. Sub 2048R/DEADDA7A created: expires: never usage: E Pub 2048R/DEADBEEF created: expires: never usage: SC Now we're ready to delete all others, but need to know which to remove: gpg> list Start editing your key: $ gpg -edit-key 47AB515A gnupg folder (for unix systems, for Windows wherever your key is stored)! # Prints the GPG key ID, in ASCII armor formatĬopy your GPG key, beginning with -BEGIN PGP PUBLIC KEY BLOCK- and ending with -END PGP PUBLIC KEY BLOCK-.You cannot remove all UIDs, but you can create one which does not link to your identity and remove all others.īackup your. In this example, the GPG key ID is 3AA5C34371567BD2: $ gpg -armor -export 3AA5C34371567BD2 Paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2: $ gpg -list-secret-keys -keyid-format=long In this case you will also need to configure Git to use gpg2 by running git config -global gpg.program gpg2.įrom the list of GPG keys, copy the long form of the GPG key ID you'd like to use. Note: Some GPG installations on Linux may require you to use gpg2 -list-keys -keyid-format LONG to view a list of your existing keys instead. Press Enter to specify the default selection, indicating that the key doesn't expire. Your key must be at least 4096 bits.Įnter the length of time the key should be valid. $ gpg -default-new-key-algo rsa4096 -gen-keyĪt the prompt, specify the kind of key you want, or press Enter to accept the default.Īt the prompt, specify the key size you want, or press Enter to accept the default. If you are not on version 2.1.17 or greater, the gpg -full-generate-key command doesn't work.If you are on version 2.1.17 or greater, paste the text below to generate a GPG key pair.Since there are multiple versions of GPG, you may need to consult the relevant man page to find the appropriate key generation command. We generally recommend installing the latest version for your operating system. For more information, see " Verifying your email address."ĭownload and install the GPG command line tools for your operating system. If you haven't verified your email address, you won't be able to sign commits and tags with GPG. Note: Before generating a new GPG key, make sure you've verified your email address.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |