gopass/docs/commands/insert.md
Yolan Romailler d56639fcd7
[CLEANUP] Migration of options to more appropriate sections (#2681)
* [CLEANUP] Moving options to the correct config section

This adds an easy migration path to our config handling, which should
allow us to migrate option names around much more easily in the future.

Any system level config or env variables options are not migrated.

This also fixes a bug in our test code, where the root mount path was
not properly set in our config, because we used "path:" instead of
"path=" to set it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Document legacy options and their migration path

This also makes sure that legacy options aren't used in the code anymore using the docs test and its regexp

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Removing weird spaces from changelog

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Reformatting our Markdown tables properly

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [TESTING] Patching a timezone bug in tests

This is a fun one where if your Timezone isn't UTC and you are past midnight but it's not past midnight UTC, the tests would fail because you're not using the right date to validate it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Fix a typo and use the correct Env variables in the doc about the custom Env variables

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BREAKING] Custom Env options moved from GOPASS_CONFIG_CONFIG_KEY_i to GOPASS_CONFIG_KEY_i

As discussed in #2617, this actually reflects the way GIT_CONFIG works.

It also fixes a potential Panic in our codebase when IsSet was called
without any Preset config on a non-existing key.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Patching all of the new linter complaints

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Use Go1.21 everywhere

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Increase our Golangci timeout

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] code review comment and extra regression test

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-03 18:40:58 +01:00

1.8 KiB

insert command

The insert command is used to manually set (insert, or change) a password in the store. It applies to either new or existing secrets.

Synopsis

$ gopass insert entry
$ gopass insert entry key

Modes of operation

  • Create a new entry with a user-supplied password, e.g. a new site with a user-generated password or one picked from gopass pwgen: gopass insert entry
  • Change an existing entry to a user-supplied password
  • Create and change any field of a new or existing secret: gopass insert entry key
  • Read data from STDIN and insert (or append) to a secret

Insert is similar in effect to gopass edit with the advantage of not displaying any content of the secret when changing a key.

Note: insert will not change anything but the Password field (using the insert entry invocation) or the specified key (using the insert entry key invocation).

Flags

Flag Aliases Description
--echo -e Display the secret while typing (default: false)
--multiline -m Insert using $EDITOR (default: false). This identical to running gopass edit entry. All other flags are ignored.
--force -f Overwrite any existing value and do not prompt. (default: false)
--append -a Append to any existing data. Only applies if reading from STDIN. (default: false)