From aff0cbd11d8c7c1a5aae457980f4d2ef6d8c93ab Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 4 Apr 2023 15:06:50 +0200 Subject: [PATCH] chore: added loads of examples, improved article structure --- knowledge base/gopass.md | 145 ++++++++++++++++++++++++++++++++++----- 1 file changed, 129 insertions(+), 16 deletions(-) diff --git a/knowledge base/gopass.md b/knowledge base/gopass.md index 79d6f1a..4e28b65 100644 --- a/knowledge base/gopass.md +++ b/knowledge base/gopass.md @@ -1,41 +1,128 @@ # Gopass +## Table of contents + +1. [TL;DR](#tldr) +1. [File formats](#file-formats) +1. [Browsers integration](#browsers-integration) + 1. [Browserpass](#browserpass) +1. [Troubleshooting](#troubleshooting) +1. [Further readings](#further-readings) +1. [Sources](#sources) + ## TL;DR ```sh -# Initiate the root store. +# Setup new stores. +# If no options are given, defaults are used. +gopass setup + +# Show all configuration values. +gopass config + +# Show specific configuration values only. +gopass config 'core.autoclip' + +# Update specific configuration values. +gopass config 'core.autoclip' false + +# Initiate the *root* store. gopass init -gopass init -p 'path/to/root/store' +gopass init -p 'path/to/root/store' 'key-id' + +# List entries. +gopass list + +# Interactively create secrets. +gopass create +gopass new # Insert new entries. gopass insert 'path/to/secret' -gopass insert 'path/to/secret' -m +gopass insert -m … + +# Copy secrets' password to the clipboard. +# Do *not* print secrets out. +gopass show -c 'path/to/secret' # Edit new or existing secrets. gopass edit 'path/to/secret' -gopass set 'path/to/secret' +gopass set … # Delete entries. gopass delete 'path/to/secret' -gopass remove 'path/to/secret' -gopass rm 'path/to/secret' +gopass remove -r … +gopass rm … + +# Copy entries. +gopass copy 'from' 'to' +gopass cp … + +# Move entries. +gopass move 'from' 'to' +gopass mv … + +# Link entries. +gopass link 'from' 'to' +gopass ln … + +# Copy files. +gopass fscopy '/path/to.file' 'path/to/secret' +gopass fscopy 'path/to/secret' '/path/to.file' + +# Copy files and remove the source. +gopass fsmove '/path/to.file' 'path/to/secret' +gopass fsmove 'path/to/secret' '/path/to.file' + +# Get sha256sum of secrets. +gopass sum 'path/to/secret' +gopass sha … +gopass sha265 … + +# Find entries matching the search string. +gopass find 'github' +gopass search … + +# Find secrets containing the search string when decrypted. +gopass grep 'search-string' # List mounted stores. gopass mounts # Add (a.k.a mount) existing stores in multi store mode. -gopass mounts add 'archive' '.password-store.archive' -gopass mounts mount 'test' '.password-store.test' +# Default command for 'mounts' if missing. +gopass mounts 'store' 'path/to/store' +gopass mounts add … +gopass mounts mount … # Create and mount stores. -gopass init --store 'private' --path '.password-store.private' -gopass init --store 'work' --path '.password-store.work' +gopass mounts add -c 'store' 'path/to/store' +gopass init -s 'store' -p 'path/to/store' # Remove (a.k.a unmount) stores. -gopass mounts remove 'test' '.password-store.test' -gopass mounts rm 'test' '.password-store.test' -gopass mounts unmount 'archive' '.password-store.archive' -gopass mounts umount 'archive' '.password-store.archive' +gopass mounts remove 'store-1' … 'store-N' +gopass mounts rm … +gopass mounts unmount … +gopass mounts umount … + +# List all recipients. +gopass recipients + +# Add recipients. +gopass recipients add 'key-id' +gopass recipients add -s 'store' … + +# Remove recipients +gopass recipients remove '0xB5B44266A3683834' +gopass recipients remove -s 'store' … + +# Check the stores integrity, clean up artifacts and re-encrypt secrets if +# recipients are missing. +gopass fsck + +# Sync with remotes. +gopass sync +gopass sync -s 'store-1' … 'store-N' # Reset gopass' configuration. rm "${HOME}/.config/gopass/config" @@ -44,6 +131,10 @@ rm "${HOME}/.config/gopass/config" rm -r "${HOME}/.local/share/gopass/stores/root" ``` +## File formats + +See [secrets], but mostly [features]. + ## Browsers integration ### Browserpass @@ -56,11 +147,33 @@ for b in chromium chrome vivaldi brave firefox; do done ``` +## Troubleshooting + +See [faq]. + ## Further readings -- GoPass [features] +- [website] +- GoPass [documentation] +- [woile's cheatsheet] + +## Sources + +All the references in the [further readings] section, plus the following: + - [BrowserPass extension installation guide] + +[config]: https://github.com/gopasspw/gopass/blob/master/docs/config.md +[documentation]: https://github.com/gopasspw/gopass/tree/master/docs +[faq]: https://github.com/gopasspw/gopass/blob/master/docs/faq.md [features]: https://github.com/gopasspw/gopass/blob/master/docs/features.md +[secrets]: https://github.com/gopasspw/gopass/blob/master/docs/secrets.md +[website]: https://www.gopass.pw/ -[browserpass extension installation guide]: https://github.com/browserpass/browserpass-extension#installation + +[further readings]: #further-readings + + +[browserpass extension installation guide]: https://github.com/browserpass/browserpass-extension# +[woile's cheatsheet]: https://woile.github.io/gopass-cheat-sheet/