Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.72 KB

gnupg.md

File metadata and controls

48 lines (33 loc) · 1.72 KB

gnupg

You need to create a gpg key as follows:

  1. Open your terminal
  2. pass the text below to generate a GPG key pair
gpg --gen-key
  1. At the prompt, specify the kind of key you want, or press Enter to accept the default RSA and RSA.

  2. Enter the desired key size. We recommend the maximum key size of 4096.

  3. Enter the length of time the key should be valid. Press Enter to specify the default selection, indicating that the key doesn't expire.

  4. Verify that your selections are correct.

  5. Enter your user ID information.

  6. Type a secure passphrase.

  7. Use the gpg --list-secret-keys --keyid-format LONG command to list GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.

  8. From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is 999B9F49130D2336

/home/fabio/.gnupg/secring.gpg
------------------------------
sec   2048R/999B9F49130D2336 2018-01-04
uid                          name surname <value@you_email.com>
ssb   2048R/999B9F49130D2336 2018-01-04
  1. Paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG
gpg --armor --export 999B9F49130D2336
  1. Copy your GPG key, beginning with -----BEGIN PGP PUBLIC KEY BLOCK----- and ending with -----END PGP PUBLIC KEY BLOCK-----, as explained here

  2. send me an email with your public key so that I can add your user as authorized

  3. to add a new user, save the public key in a file and then run

gpg --import finename.key.pub 
  1. encrypt again all the secret data in order to give access to the new user.