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
New config datalad.credentials.force-ask
to force interactive credential updates
#5777
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks straight forward to me.
Codecov Report
@@ Coverage Diff @@
## master #5777 +/- ##
==========================================
- Coverage 90.62% 88.60% -2.02%
==========================================
Files 309 306 -3
Lines 42381 42356 -25
==========================================
- Hits 38406 37531 -875
- Misses 3975 4825 +850
Continue to review full report at Codecov.
|
can't lookup atm, but I think we contemplated a command like edit 20210715: found it #4981 (comment) |
OK, I will put this back in draft mode. It does not work: parallel operation!
asks twice. |
So thinking about this for a bit more. It might just be a matter of documenting that parallel operations and this flag do not work conveniently with each other. Any other solution would yield in a undesirably complex entangling of credential queries and download (or other) operations. A legitimate Q is whether this is worth pursuing at all, rather than implementing #5777 (comment) ( Bottom line: I think this is a useful feature, even with a coming |
Without going into technical details, I agree with the rationale given here. Especially since the |
I tend to agree, but it may need reconsideration of config naming. We have command specific configs like The feature itself seems to be worthwhile with or w/o the command, though. |
Do you have a suggestion for a change? |
make it |
This change introduces a new configuration setting: ``` % datalad x-configuration ... # Force (re-)entry of credentials # Should DataLad prompt for credential (re-)entry? This can be used to # update previously stored credentials. datalad.credentials.force-ask=False ... ``` It enables seamless updates of stored credentials. Importantly, users are no longer required to learn where credentials are stored, and how to update them in that store. It makes instructions provided in the handbook on how to learn python `keyring` superfluous. Credential updates are simply entered at the same place where the original credentials were provided. This is not a perfect solution (can get messy when there are a number of credentials involved in a single datalad operation, and only a single one needs updating), but it addresses a substantial usability issue for a broad range of use cases in a straightforward manner. Besides being compatible with the usual ways of DataLad configuration handling, this also works for plain git-annex calls that trigger DataLad's credential handling, e.g.: ``` git -c datalad.credentials.force-ask=no annex get T1w_acpc_dc.nii.gz ``` Fixes datalad#5775
Bowed to the majority of expressed opinions, and force-pushed an amendment that renames the config setting to plural. |
Took out of draft mode, ready to merge. Test failure is unrelated #5794 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be worth to tune up PR title to become more specific, before merge
datalad.credentials.force-ask
to force interactive credential updates
Title is updated. |
This change introduces a new configuration setting:
It enables seamless updates of stored credentials. Importantly, users
are no longer required to learn where credentials are stored, and how to
update them in that store. It makes instructions provided in the
handbook on how to learn python
keyring
superfluous. Credentialupdates are simply entered at the same place where the original
credentials were provided.
This is not a perfect solution (can get messy when there are a
number of credentials involved in a single datalad operation, and only a
single one needs updating), but it addresses a substantial usability
issue for a broad range of use cases in a straightforward manner.
Besides being compatible with the usual ways of DataLad configuration
handling, this also works for plain git-annex calls that trigger
DataLad's credential handling, e.g.:
Fixes #5775
This is related to #396 by addressing the "update" use case.