360 Secure SkillHub
360 安全技能中心

gopass

该 Skill 说明如何使用 gopass 命令行密码管理器:列出/查看/插入/编辑/删除密码条目,生成随机密码或口令短语,管理挂载子库、GPG 收件人和 TOTP,并通过 git 同步;文档还给出非交互式脚本用法(echo 管道、-o 纯密码输出)。需预先安装 gopass 与 GPG 并初始化存储。

erdgeclaw
erdgeclaw
热度 96.19
最近更新 2026-05-18 11:55:06
分类:安全依赖:代码执行应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gopass
Metadata
name
gopass
description
Store, retrieve, list, and manage secrets using gopass (the team password manager). Use when the user asks to save credentials, look up passwords, generate secrets, manage password entries, or interact with a gopass password store. Covers CRUD operations, secret generation, TOTP, recipients, mounting stores, and clipboard operations.

gopass Skill

gopass is a CLI password manager for teams, built on GPG and Git.

Prerequisites

  • gopass binary installed
  • GPG key available (gopass uses GPG for encryption)
  • Store initialized (gopass init or gopass setup)

Common Operations

List secrets

gopass ls
gopass ls -f          # flat list

Show a secret

gopass show path/to/secret           # full entry (password + metadata)
gopass show -o path/to/secret        # password only
gopass show -c path/to/secret        # copy to clipboard
gopass show path/to/secret key       # show specific field

Create / Update

gopass insert path/to/secret         # interactive
gopass edit path/to/secret           # open in $EDITOR
echo "mypassword" | gopass insert -f path/to/secret   # non-interactive

Add key-value metadata below the first line (password):

mysecretpassword
username: erdGecrawl
url: https://github.com
notes: Created 2026-01-31

Generate passwords

gopass generate path/to/secret 24           # 24-char password
gopass generate -s path/to/secret 32        # with symbols
gopass generate --xkcd path/to/secret 4     # passphrase (4 words)

Delete

gopass rm path/to/secret
gopass rm -r path/to/folder          # recursive

Move / Copy

gopass mv old/path new/path
gopass cp source/path dest/path

Search

gopass find github                   # search entry names
gopass grep "username"               # search entry contents

Store Management

Initialize

gopass setup                         # guided first-time setup
gopass init <gpg-id>                 # init with specific GPG key

Mount sub-stores

gopass mounts add work /path/to/work-store
gopass mounts remove work
gopass mounts                        # list mounts

Sync (git push/pull)

gopass sync

Recipients (team access)

gopass recipients                    # list
gopass recipients add <gpg-id>
gopass recipients remove <gpg-id>

TOTP

gopass otp path/to/secret            # show current TOTP code

Store TOTP URI as totp: otpauth://totp/... in the entry body.

Non-interactive Tips

  • Use echo "pw" | gopass insert -f path for scripted inserts
  • Use gopass show -o path for machine-readable password-only output
  • Use gopass show -f path to suppress warnings
  • Set GOPASS_NO_NOTIFY=true to suppress desktop notifications
  • Use gopass --yes to auto-confirm prompts