This change adds GoDoc comments to many of the public symbols in the
`pkg/` directory. It also includes various improvements to the
documentation in `README.md` and other markdown files in the `docs/`
directory.
This is a partial documentation effort, as requested by the user, to
get a pull request submitted quickly.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* feat: Clone remote on init
When a remote is provided to the init command, try to clone it first.
If the cloned repository is not empty, use it as the password store.
Otherwise, initialize a new password store.
* feat: Clone remote on setup
When a remote is provided to the setup command, try to clone it first.
If the cloned repository is not empty, use it as the password store.
Otherwise, initialize a new password store.
* [fix] Remove init during clone
When we clone a repo we never want to initialize it automatically.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
---------
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
When cleaning up the public keys in the .public-keys directory, we were
previously only considering the top-level .gpg-id file. This could lead
to the removal of public keys that were still in use in sub-stores.
This commit fixes this by changing the `idFiles` function to correctly
find all .gpg-id files in the store, including nested ones.
It also introduces a new `AllRecipients` function that gathers all
recipients from the main store and all sub-stores by using the corrected
`idFiles` logic.
The `UpdateExportedPublicKeys` function is refactored to use
`AllRecipients` to get the complete list of recipients, removing the need
to pass them as an argument. All call sites of `UpdateExportedPublicKeys`
are updated accordingly.
Finally, the logic for finding extra keys to remove is extracted into a
standalone `extraKeys` function, and a new unit test `TestExtraKeys` is
added to verify its behavior.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit changes the check whether we have access to the cloned
repository from checking whether *all* of our usable keys are included
to whether *any* of our usable keys are included.
Signed-off-by: Willem Mulder <willemmaster@hotmail.com>
This commit adds yet another config handler for gopass. It is based on
the format used by git itself. This has the potential to address a lot
of long standing issues, but it also causes a lot of changes to how we
handle configuration, so bugs are inevitable.
Fixes#1567Fixes#1764Fixes#1819Fixes#1878Fixes#2387Fixes#2418
RELEASE_NOTES=[BREAKING] New config format based on git config.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
address comments
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit adds rudimentary support for cloning Fossil repositories.
It also adds auto-generation of new encryption keys on clone, in case
none are present.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Running gci in order to make sure we have properly deterministic imports
RELEASE_NOTES=n/a
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
This commit adds a getting started section to the readme and improves
the gopass clone UX a little it. It also fixes the call depth for nested
debug.Log invocations (e.g. during ExitError) and adds debug logging
for every out invocation.
Fixes#1839
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit renames the existing out methods that expect
a format string to include the common f suffix and introduces
new out methods without this suffix that don't accept a
format string or variadic arguments.
Fixes#1793
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This PR moves some packages from internal to pkg to increase the
independence of binaries in cmd/ from internal packages further.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit reduces the usage of internal/ packages in auxiliary
binaries so we can get closer to eventually moving them to their own
repos.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Fixes#1460Fixes#1462
This commit fixes broken shadowing in the new tree implementation
as well as removing the broken init flag to mounts add.
RELEASE_NOTES=[BUGFIX] Fix tree shadowing.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit adds a new debug package to gopass.
It is heavily inspired by github.com/restic/restic/internal/debug
and adapted for the gopass use case.
This change allows to further trim down the source code since the
new package doesn't propagate the debug flag in the context anymore.
As such we can now omit passing ctx in most places.
In order to ensure we don't accidentially keep passing ununsed
parameters we also introduce unparam to check for extra arguments.
RELEASE_NOTES=[ENHANCEMENT] New Debug package
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
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#569Fixes#1225
RELEASE_NOTES=[DEPRECATION] Remove askformore, autosync,
check_recipient_hash and concurrency options.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>