Skip to content

Instantly share code, notes, and snippets.

@peltho
Last active December 16, 2023 13:21
Show Gist options
  • Save peltho/b713c6b9e8879fb4664d5cdb8548939a to your computer and use it in GitHub Desktop.
Save peltho/b713c6b9e8879fb4664d5cdb8548939a to your computer and use it in GitHub Desktop.
How to setup a pass server

Pass (unix password manager)

Configuration

Server-side
  1. Create a GPG encrypted key: gpg2 --full-gen-key
  2. Export it in a file to share with your guests: gpg2 --export-secret-keys > key.gpg
  3. Retrieve your key with: gpg --list-keys
  4. Init a pass directory: pass init <key>
  5. Init git support: pass git init
  6. Allow incoming push from remotes: git config receive.denyCurrentBranch updateInstead
Client-side
  1. Register to server: ssh-copy-id user@server.com
  2. Create a local pass repository: pass init
  3. Init git support: pass git init
  4. Import gpg key from server: gpg2 --import <key> (not sure if needed)
  5. Add a git remote: pass git remote add origin ssh://user@server.com:/home/<user>/.password-store/
  6. Start registering passwords !

Usage

Creation

pass insert domain/user (ie: pass insert github.com/peltho). You'll be prompted to type the corresponding password.

More documentation here.

Then, send it to server this way: pass git push origin master.

To retrieve all server stored passwords (ie: for a new machine): pass git pull origin master.

Chrome extension

Go to browserpass' github page and install browserpass-native then browserpass-extension.

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