Skip to content

Managing GPG Keys

Adding Your Public Key

To keep it simple, you need to do the following in order once:

  1. Generate a GPG key, substituting your name and email address:

    gpg --batch --generate-key <(cat <<EOF
    Key-Type: RSA
    Key-Length: 4096
    Subkey-Type: RSA
    Subkey-Length: 4096
    Name-Real: <my-name>
    Name-Email: <my-email>
    Name-Comment: Lyceum
    Expire-Date: 1y
    %commit
    EOF
    )
    
  2. Export your GPG public key:

    # Determine your key ID, it will be a hexadecimal string similar to
    # `7DE1A17CD3B3A066B4145EABFBE1A94F9CB4A375`
    $ gpg --list-keys
    
    $ gpg --armor --export <my-key-id> > primary.asc
    
  3. Add your GPG public key to the people directory at /people/<you>/gpg/primary.asc.

Importing All Public Keys

To import all users' public keys into your GPG keyring, simply run make import-gpg-keys in /people.

Re-Encrypting Files

We use GPG keys to encrypt certain committed files. After adding or updating a user's GPG key, follow the instructions here.