pass.
Setup
Install gopass
Initialize gopass
If you haven’t set up gopass yet:Add Secrets
Template Function
gopass
Get the first line from a gopass entry:
gopass show -o github/token and returns the first line.
Usage Examples
Simple Passwords
Git Configuration
~/.gitconfig.tmpl
AWS Credentials
~/.aws/credentials.tmpl
Database Credentials
~/.config/db/config.yml.tmpl
Multiple API Keys
~/.config/api-keys.env.tmpl
SSH Configuration
~/.ssh/config.tmpl
Docker Registry Credentials
~/.docker/config.json.tmpl
Configuration
Custom Command
Ifgopass is not in your PATH:
~/.config/chezmoi/chezmoi.toml
gopass Features
Multiple Stores (Mounts)
gopass supports multiple password stores:Team Collaboration
gopass makes it easy to share passwords with a team:Sync with Git
gopass automatically commits changes to git:Generate Passwords
Organizing Your Password Store
Use a hierarchical structure:Advanced Usage
Environment-Specific Secrets
~/.config/app/config.yml.tmpl
Copy Secrets to Clipboard
Search Secrets
Audit and Security
Complete Examples
Multi-Service Configuration
~/.config/services.yml.tmpl
Troubleshooting
GPG Key Not Found
Ensure your GPG key is available:Secret Not Found
List all secrets:Command Not Found
Ensure gopass is installed:Testing Templates
Test template functions:Sync Issues
Force sync with git:gopass vs pass
| Feature | pass | gopass |
|---|---|---|
| Backend | GPG + Git | GPG + Git |
| Team Support | Manual | Built-in |
| Multiple Stores | Manual | Native |
| Auto-sync | No | Yes |
| Binary Attachments | Extensions | Native |
| YAML/JSON Support | No | Yes |
| UI | CLI only | CLI + GUI |
| OTP Support | Extension | Native |
Best Practices
- Use stores: Separate personal, work, and shared passwords
- Sync regularly: Enable automatic git sync
- Use hierarchy: Organize secrets in logical folders
- Generate passwords: Use gopass generate for strong passwords
- Audit regularly: Run
gopass auditto check for issues - Backup: Keep encrypted backups of your password store
- Team sharing: Use proper recipient management for teams
- Use descriptive names: Make entry names clear and searchable
See Also
- gopass Website
- gopass GitHub
- gopass Documentation
- pass - Standard Unix password manager
- Template Functions Reference