gopass/docs/commands/create.md
Dominik Schulz 9edbf3070c
[feat] Allow supression of password generation in create templates (#2821)
* [feat] Allow supression of password generation in create templates

This PR adds a new always_prompt boolean that allows suppressing the
question that ask for generating a password in create templates. Use
this is you always want to force entering the credentials, e.g. if
you use a specific template for vendor-supplied credentials.

Fixes #2819

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove failing integration test

The messages have changed and the removed one is not expected anymore.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix lint check

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-13 14:11:52 +01:00

1.8 KiB

create command

The create command creates a new secret using a set of built-in or custom templates. It implements a wizard that guides inexperienced users through the secret creating.

The main design goal of this command was to guide users through the creation of a secret and asking for the necessary information to create a reasonable secret location.

Synopsis

gopass create
gopass create --store=foo

Modes of operation

  • Create a new secret using a wizard

Templates

gopass create will look for files ending in .yml in the folder .gopass/create inside the selected store (by default the root store).

To add new templates to the wizard add templates to this folder.

Example:

$ cat $(gopass config mounts.path)/.gopass/create/aws.yml
---
priority: 5
name: "AWS"
prefix: "aws"
name_from:
  - "org"
  - "user"
welcome: "🧪 Creating AWS credentials"
attributes:
  - name: "org"
    type: "string"
    prompt: "Organization"
    min: 1
  - name: "user"
    type: "string"
    prompt: "User"
    min: 1
  - name: "password"
    type: "password" # hide input
    prompt: "Password"
    always_prompt: true # do not offer password generation, always ask
    charset: abcdefghijklmnop # generate password with this charset
  - name: "comment"
    type: "string"
    prompt: "Comments"

Flags

Flag Aliases Description
--store -s Select the store to use. Will be used to look up user templates.
--force -f For overwriting existing entries.
--print -p Print the password to STDOUT.