TIPS: GPG/Gopass

How to add a new GPG public key to gopass?

Because I don’t want to remember this…

  1. The new member generates a new public key (ex: newbee.pem)
  2. He/She shares the key somehow (public keyring, slack, jira etc).
    Sharing as a file is preferred because it will reduce the likelihood of a bad copy/paste.
  3. A team member needs to add the key to their keychain.
    gpg --import newbee.pem
  4. Then he can to update the gopass recipient list. (This will re-encrypt all secrets)
    fp=$(gpg -k newbee@email.com | grep -e '^\s' | tr -d ' ') gopass recipients add ${fp}
  5. And sync upstream so everyone else knows about it.
    gopass sync

Contents