gopass Password Manager
Overview
gopass is a GPG-encrypted password manager (compatible with pass). Credentials are stored in a git-backed directory structure with automatic encryption/decryption.
Credential Organization
|
Use separate entries, not combined.
Each credential type gets its own entry. This allows:
|
Basic Operations
Show Password
# Show password (prompts for GPG key)
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) - for scripts
gopass show -o ADMINISTRATIO/servers/home-dc01/Administrator
Generate Password
# Generate 32-character password
gopass generate ADMINISTRATIO/servers/home-dc01/Administrator 32
# Without symbols
gopass generate -s ADMINISTRATIO/servers/home-dc01/Administrator 32
# Copy to clipboard
gopass generate -c ADMINISTRATIO/servers/home-dc01/Administrator 32
Insert Entry
Single Line (Password Only)
# Interactive
gopass insert ADMINISTRATIO/servers/home-dc01/Administrator
# From stdin (scripting)
echo "MyPassword123" | gopass insert ADMINISTRATIO/servers/home-dc01/Administrator
Multi-Line with Heredoc
|
Heredoc is the preferred method for metadata entries. |
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
The << 'EOF' syntax:
-
<<starts heredoc -
'EOF'with quotes prevents variable expansion -
Everything until
EOFis input -
EOFon its own line ends input
Search
# Search entry names
gopass find home-dc01
# Search entry contents (decrypts all - slow!)
gopass grep "10.50.1.50"
# List and filter
gopass ls | grep -i server
Git Sync
gopass stores are git repositories:
# Sync with remote
gopass sync
# Git status
gopass git status
# Manual operations
gopass git pull
gopass git push
Server Deployment Example
Generate Credentials
# Administrator password
gopass generate ADMINISTRATIO/servers/home-dc01/Administrator 32
# DSRM password (for Domain Controllers)
gopass generate ADMINISTRATIO/servers/home-dc01/dsrm 32
Recommended Structure
ADMINISTRATIO/
├── servers/
│ ├── home-dc01/
│ │ ├── Administrator
│ │ ├── dsrm
│ │ └── meta
│ ├── ise-01/
│ │ └── admin
│ └── pfsense/
│ └── admin
├── services/
│ ├── vault/
│ │ ├── root-token
│ │ └── unseal-keys
│ └── ise/
│ ├── admin
│ └── ers-api
└── network/
├── switches/
│ └── admin
└── wlc/
└── admin
Quick Reference
| Operation | Command |
|---|---|
List all |
|
Show password |
|
Copy to clipboard |
|
Output only |
|
Generate password |
|
Insert (interactive) |
|
Insert (heredoc) |
|
Edit |
|
Delete |
|
Search |
|
Sync |
|