Skip to content

Instantly share code, notes, and snippets.

@marcaurele
Last active May 25, 2022 09:37
Show Gist options
  • Save marcaurele/b6f280517648440c99861fe61ece727b to your computer and use it in GitHub Desktop.
Save marcaurele/b6f280517648440c99861fe61ece727b to your computer and use it in GitHub Desktop.
Team management for passwotdstore.org

Share a repository for password with pass

Pass is a great command line tool to handle your password, as well in a team.

Add a new member in the team

Add the key into your local GPG base:

$ gpg --keyserver <a specific key server if needed> --search-keys <email address>

Now you have to trust your teammate keys:

$ gpg --edit-key <email address>

gpg> trust
gpg> 5  # Because you trust them ultimately
gpg> save

You can add a new member in the repository by adding it's email address to the .gpg-id file:

$ echo <email address> >> .gpg-id

Re-encode the store after adding the new member

To let the new member, or when a member is leaving, you should re-encode all the passwords from the store:

# Give the correct path/alias if you're not using the default location
$ pass init $(cat ~/.password-store/.gpg-id)
$ pass git push
# Re-encode a specific path
$ pass init -p shared $(cat ~/.password-store/shared/.gpg-id)

Multiple password store repository on the same server

If you want to have multiple repositories to host different sets of passwords, you can clone another repository and add an alias in your shell. See the documentation in the source code of the password store, see https://git.zx2c4.com/password-store/tree/src/completion

Based on https://medium.com/@davidpiegza/using-pass-in-a-team-1aa7adf36592

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment