Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configurable keyring (collection) to use #7

Open
camh- opened this issue Sep 4, 2024 · 1 comment
Open

Allow configurable keyring (collection) to use #7

camh- opened this issue Sep 4, 2024 · 1 comment
Assignees

Comments

@camh-
Copy link
Member

camh- commented Sep 4, 2024

Make the keyring/collection used to store the git secrets configurable via the usual git config.

The keyring may be an alias, which is what the "default" keyring is, or an actual collection. If it is not an existing alias and not a collection, we should create the collection for the given name. This allows the user to store all their git credentials in a separate keyring if they want and it will be created automatically if it does not exist.

@camh-
Copy link
Member Author

camh- commented Jan 13, 2025

The collection will be specified as --collection <string> or -c <string> and applies to the three operatons (get, store, delete). The flag will be at the program level so it can be applied as git-credential-fdoss --collection foo store ... as the configuration of the helper would place the flags before the operation. That is, one can specify the helper in the git config as:

[credential]
    helper = fdoss --collection foo

and git will append the operation (get, store, delete) to the command. This means the flag cannot be at the operation level as those must be specified after the operation (sub-command) on the command line.

If the collection is not specified (empty string), then credentials are stored in the collection with the default alias, and get and delete look for the credential across all collections. The is the current behaviour.

If a collection is specified, then it will be used exclusively for the operation for which it is specified. If a credential is being stored and the specified collection does not exist, it will be created.

@camh- camh- self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant