21 Commits

Author SHA1 Message Date
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
Dominik Schulz
f58454452f
Increase test coverage (#2461)
RELEASE_NOTES=n/a

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

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-10 23:05:33 +01:00
Dominik Schulz
16c071a780
Enable golangci-lint on push and pr (#2158)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-24 21:58:53 +01:00
Dominik Schulz
5f8afb6415
Improve compatibility with passage (#2060)
* Improve compatibility with github.com/FiloSottile/passage

Part of #2060

RELEASE_NOTES=[ENHANCEMENT] Passage compat improvements

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

* Add migration tooling to automate upgrades with existing age backends

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-12-21 11:04:35 +01:00
Dominik Schulz
2c9cbb5208
Add more debug logging (#1856)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-03-20 20:54:56 +01:00
Dominik Schulz
d9759ffec8
Replace github.com/pkg/errors by stdlib errors (#1750)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-26 09:21:52 +01:00
Dominik Schulz
2d1b87514c
UX update (#1715)
Streamline command output, add unicode icons and ask for passphrase
during onboarding.

Fixes #1698

RELEASE_NOTES=[ENHANCEMENT] UTF-8 emojis
RELEASE_NOTES=[BUGFIX] Ask passphrase upon key generation


Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-18 13:54:49 +01:00
Dominik Schulz
0549c36ab0
Cleanup config (#1391)
aka unpopular opinions.

This commit removes a lot of weight and legacy as well as some features.
This wil break some exotic use cases which is regretable, but it is
inevitable and important to clean up these bad past design choices.

It removes some configuration options but most importantly it does
revert the decision to introduce an awkward custom backend URL
schema. This is an important step in the direction of zero configuration
and convention over configuration.

Fixes #569
Fixes #1225

RELEASE_NOTES=[DEPRECATION] Remove askformore, autosync,
check_recipient_hash and concurrency options.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-05-28 22:35:30 +02:00
Moritz Johner
21ff26d73a
feat: support windows (#1295)
* feat: support windows

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>

* fix: revert unnecessary changes

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>

* fix: remove useless test

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
2020-04-29 00:27:05 +02:00
Martin Hoefling
3ba59c0d6b
Windows tests (#1171)
* make tests run on windows and osx

* add osx and windows as test target
* add slow test factor as osx doesn't seem to be fast enough to capture the test interval
* reset buildflags on windows as no PIC code can be built
* append .exe to gopass output
* fix some tests on windows, disable others

Signed-off-by: Martin Hoefling <martin.hoefling@gmx.de>

* kill gpg and test commands on windows after test

Signed-off-by: Martin Hoefling <martin.hoefling@gmx.de>

* disable problematic clipboard and jsonapi tests under windows

Signed-off-by: Martin Hoefling <martin.hoefling@gmx.de>
2020-04-24 17:52:00 +02:00
Dominik Schulz
f9689154b4
Codequality: add revive linter (#822) 2018-06-01 10:28:20 +02:00
Dominik Schulz
38a71e061e Fix integration test 2018-05-03 12:26:07 +02:00
Dominik Schulz
1060b1485a
Fix gopass init (#757)
Fixes #751
2018-04-25 14:08:34 +02:00
Smaug
d33f6c42e6 Integration test and jsonapi fixes for windows (#450) 2017-11-06 15:36:51 +01:00
Dominik Schulz
df5aa3d432 Improve output (#392)
This commit introduces a new out package to unify the output and
improve visibility and structure.
2017-10-11 21:28:31 +02:00
Dominik Schulz
3900b2a903 Do not select invalid keys (#364)
Fixes #349
2017-09-29 12:53:06 +02:00
Martin Hoefling
701df7f05e Fix tests on macos (wrong temp path in asserts) (#341) 2017-09-18 09:19:31 +02:00
Dominik Schulz
8ef89b3a59 Improve error handling and propagation (#280)
This commit makes heavy use of github.com/pkg/errors to improve
handling and propagation of errors and to provide more meaningful
error messages. It also fixes some minor issues/wording wrt. error
message. Also it introduces distinct exit codes for different types
of errors.

Fixes #150
2017-08-23 17:38:22 +02:00
Dominik Schulz
8dc7ff2a68 Document commands working with sub stores (#252)
This commit improves documentation wrt. sub-stores, fixes some
tests and better aligns the gopass init parameters with the
rest of the commands.

Fixes #200
2017-08-09 12:13:23 +02:00
marthjod
d249f0077d add hint for adding secondary stores (#98) (#194)
* add hint for adding secondary stores (#98)

...in case an already initialized primary store is found

* lint: error string without period
2017-07-18 09:58:03 +02:00
marthjod
8ea2545ed3 configure user.name, user.email before initial git commit (#179) (#185)
* configure user.name, user.email before initial git commit (#179)

Avoid potential failure on initial git commit:
Prompt user for necessary git config values and
provide private key identity names/emails
as suggestions for convenience.

* lint: drop superfluous declaration of zero value

* rm stray lines from copy-paste

* add integration test for init action (#179)

* askForGitConfigUser: fallback if user cannot be prompted

* askForGitConfigUser: add unit test

* CI test: expect missing usable keys

CI server does not have GPG private keys set up

* simplify askForGitConfigUser: ask for name/email at once

* lint: outdent else block
2017-07-15 10:07:03 +02:00