Skip to main content

📦 Pass Password Manager - Quick Reference

The Standard Unix Password Manager

Essential commands and workflows at your fingertips

Initial Setup​

gpg --full-generate-key
Create a new GPG key (one-time setup)
pass init "email@example.com"
Initialize password store with GPG key
pass git init
Initialize git in password store
pass git remote add origin URL
Add remote repository for sync
pass git push -u origin main
Push to remote repository

Adding Passwords​

pass insert path/to/password
Add a new password (prompted to enter)
pass insert -m path/to/password
Add multi-line entry (password + notes)
pass generate path/to/password 24
Generate random 24-character password
pass generate -n path/to/password 20
Generate alphanumeric password (no symbols)
pass generate -c path/to/password 32
Generate and copy to clipboard (don't display)

Viewing Passwords​

pass
List all passwords in tree structure
pass path/to/password
Display password in terminal
pass -c path/to/password
Copy password to clipboard (clears in 45s)
pass show path/to/password
Show full multi-line entry
pass find keyword
Search for passwords containing keyword
pass grep "search term"
Search inside decrypted password files

Managing Passwords​

pass edit path/to/password
Edit existing password in $EDITOR
pass rm path/to/password
Remove a password
pass mv old/path new/path
Move or rename a password
pass cp source/path dest/path
Copy a password to another location
pass rm -r folder/
Remove entire folder of passwords

Git Sync​

pass git pull
Pull latest passwords from remote
pass git push
Push local changes to remote
pass git log
View password change history
pass git status
Check sync status
pass git diff
View uncommitted changes

GPG Key Management​

gpg --list-keys
List all GPG public keys
gpg --list-secret-keys
List all GPG private keys
gpg --export-secret-keys email > key.asc
Export GPG private key for backup
gpg --import key.asc
Import GPG key on new machine
gpg --edit-key email
Edit key (use "trust" to set trust level)

Advanced Usage​

pass init -p path/ key-id
Re-encrypt passwords in path with new key
pass init key1 key2 key3
Encrypt for multiple GPG keys (team sharing)
pass ls subfolder/
List passwords in specific subfolder
PASSWORD_STORE_DIR=~/other pass
Use alternate password store location
pass show -c5 path/to/password
Copy line 5 of multi-line entry to clipboard

Important Locations​

~/.password-store/
Default password store directory
~/.gnupg/
GPG configuration and keys directory
~/.password-store/.gpg-id
File containing GPG key ID used for encryption
/usr/share/bash-completion/completions/pass
Bash completion script (source in .bashrc)
Security Reminder

Always use a private Git repository for your password store, even though passwords are encrypted. Never commit your GPG private keys to the repository.

Pro Tip

Use pass -c instead of pass show to avoid displaying passwords on screen. The clipboard auto-clears after 45 seconds for security.

Common Workflows​

pass insert work/gitlab && pass git push
Add password and immediately sync
pass git pull && pass -c personal/email
Sync first, then copy password
pass find github | grep personal
Search and filter results

Troubleshooting​

gpg-connect-agent reloadagent /bye
Reload GPG agent after config changes
pass init "$(cat ~/.password-store/.gpg-id)"
Re-encrypt all passwords with current key
cd ~/.password-store && git status
Check for sync issues manually

Pass - The Standard Unix Password Manager

passwordstore.org