gopass Password Manager Reference
1. Overview
gopass is a GPG-encrypted password manager compatible with pass. Stores credentials in a git-backed directory structure with automatic encryption/decryption.
|
Credential Organization Pattern Use separate entries for each credential type, not combined entries:
|
2. Core Concepts
2.1. Store Structure
~/.local/share/gopass/stores/root/
├── .gpg-id # GPG key ID for encryption
├── ADMINISTRATIO/
│ ├── servers/
│ │ ├── home-dc01/
│ │ │ ├── Administrator.gpg
│ │ │ ├── dsrm.gpg
│ │ │ └── meta.gpg
│ │ └── ise-01/
│ │ └── admin.gpg
│ └── services/
│ └── vault/
│ └── root-token.gpg
└── .git/ # Git repository for sync
3. Basic Operations
3.2. Show/Retrieve Password
# Show password (prompts for GPG)
gopass show ADMINISTRATIO/servers/home-dc01/Administrator
# Copy to clipboard (auto-clears after 45s)
gopass show -c ADMINISTRATIO/servers/home-dc01/Administrator
# Output only (no newline) - useful for scripts
gopass show -o ADMINISTRATIO/servers/home-dc01/Administrator
3.3. Generate Passwords
# Generate 32-character password
gopass generate ADMINISTRATIO/servers/home-dc01/Administrator 32
# Generate without symbols
gopass generate -s ADMINISTRATIO/servers/home-dc01/Administrator 32
# Generate and copy to clipboard
gopass generate -c ADMINISTRATIO/servers/home-dc01/Administrator 32
3.4. Insert Entries
3.4.1. Single-Line (Password Only)
# Interactive (prompts for password)
gopass insert ADMINISTRATIO/servers/home-dc01/Administrator
# From stdin
echo "MySecurePassword123!" | gopass insert ADMINISTRATIO/servers/home-dc01/Administrator
3.4.2. Multi-Line with Heredoc
|
Use heredoc for multi-line entries. This is the preferred method for metadata. |
gopass insert ADMINISTRATIO/servers/home-dc01/meta << 'EOF'
hostname: home-dc01
ip: 10.50.1.50
os: Windows Server 2025 Core
domain: inside.domusdigitalis.dev
roles: AD DS, DNS
deployed: 2026-02-09
notes: New forest, replaced old dc-01
EOF
4. Credential Organization
4.1. Recommended Structure
ADMINISTRATIO/
├── servers/
│ ├── <hostname>/
│ │ ├── Administrator # Primary admin password
│ │ ├── dsrm # DSRM password (DCs only)
│ │ ├── root # Root password (Linux)
│ │ └── meta # Server metadata
│ └── ...
├── services/
│ ├── vault/
│ │ ├── root-token
│ │ └── unseal-keys
│ ├── ise/
│ │ ├── admin
│ │ └── ers-api
│ └── ...
├── network/
│ ├── pfsense/
│ │ └── admin
│ ├── wlc/
│ │ └── admin
│ └── ...
└── personal/
└── ...
4.2. Separate Entries Pattern
DO NOT combine passwords in one entry. Use separate entries:
ADMINISTRATIO/servers/home-dc01
Administrator: Password123
DSRM: DsrmPassword456
ADMINISTRATIO/servers/home-dc01/Administrator → Password123
ADMINISTRATIO/servers/home-dc01/dsrm → DsrmPassword456
ADMINISTRATIO/servers/home-dc01/meta → hostname, IP, notes
Why separate entries:
-
Each credential can be retrieved independently
-
Clipboard operations work correctly (
gopass show -cgets one password) -
Easier scripting and automation
-
Better audit trail (git history per credential)
5. Clipboard Operations
5.1. Copy to Clipboard
# Copy password (Wayland - uses wl-copy)
gopass show -c ADMINISTRATIO/servers/home-dc01/Administrator
5.2. Clipboard with wl-copy (Wayland)
For Wayland environments, combine with wl-copy:
# Copy password to clipboard using wl-copy
gopass show -o ADMINISTRATIO/servers/home-dc01/Administrator | wl-copy
# Copy and paste in one motion (for SSH, etc.)
gopass show -o ADMINISTRATIO/servers/home-dc01/Administrator | wl-copy && wl-paste
5.3. Brace Expansion for Multiple Keys
|
Brace expansion allows globbing multiple similar paths in one command. |
# Copy multiple SSH public keys at once
cat ~/.ssh/id_ed25519_{d000,sk_rk_d000,sk_rk_d000_secondary}.pub | wl-copy
# Expands to:
# cat ~/.ssh/id_ed25519_d000.pub ~/.ssh/id_ed25519_sk_rk_d000.pub ~/.ssh/id_ed25519_sk_rk_d000_secondary.pub | wl-copy
6. Git Integration
7. Search and Find
# Search entry names
gopass find home-dc01
# Search entry contents (decrypts all!)
gopass grep "10.50.1.50"
# List entries matching pattern
gopass ls | grep -i server
8. Scripting with gopass
9. Real-World Examples
9.1. New Server Deployment
# 1. Generate Administrator password
gopass generate ADMINISTRATIO/servers/home-dc01/Administrator 32
# 2. Generate DSRM password (for DCs)
gopass generate ADMINISTRATIO/servers/home-dc01/dsrm 32
# 3. Store metadata using heredoc
gopass insert ADMINISTRATIO/servers/home-dc01/meta << 'EOF'
hostname: home-dc01
ip: 10.50.1.50
os: Windows Server 2025 Core
domain: inside.domusdigitalis.dev
roles: AD DS, DNS
deployed: 2026-02-09
EOF
10. Troubleshooting
10.1. GPG Key Not Found
# Check GPG keys
gpg --list-keys
# Check store's GPG ID
cat ~/.local/share/gopass/stores/root/.gpg-id
# Re-initialize with correct key
gopass init <gpg-key-id>
11. Quick Reference
| Operation | Command |
|---|---|
List all |
|
Show password |
|
Copy to clipboard |
|
Output only |
|
Generate password |
|
Insert (interactive) |
|
Insert (heredoc) |
|
Edit |
|
Delete |
|
Search names |
|
Search contents |
|
Sync |
|
12. Store Architecture (v2)
As of 2026-02-09, credentials use the v2 taxonomy:
v2/
├── OPUS/ # Work (per-employer, portable)
│ └── chla/
├── DOMUS/ # Personal infrastructure
│ ├── ad/ # Active Directory
│ ├── network/ # Network devices
│ ├── servers/ # Server credentials
│ ├── storage/ # NAS, backup
│ ├── wifi/ # Wireless networks
│ └── devices/ # Standalone devices
├── ARCANA/ # Secrets & keys (non-logins)
│ ├── api/ # API keys
│ ├── crypto/ # Encryption keys
│ ├── ssh/ # SSH passphrases
│ ├── radius/ # RADIUS secrets
│ └── certificates/
├── COMMERCIA/ # Financial
├── PERSONAE/ # Personal accounts
└── COMMUNIS/ # Shared/family
Access v2 entries:
gopass show v2/DOMUS/ad/evanusmodestus
gopass show v2/OPUS/chla/ad/erosado
gopass show v2/ARCANA/crypto/borg-passphrase
See gopass Taxonomy for full structure and naming conventions.
13. Related Documentation
-
gopass Taxonomy - v2 structure design and naming conventions
-
gopass Migration Plan - Migration from legacy to v2