datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

GIN usage/error with broken/invalid token suboptimal #356

Open mih opened 1 year ago

mih commented 1 year ago

I have an outdated token in my credential manager. I start create-sibling-github. I do not select that credential specifically. It fails to authenticate (technically expected, but for a user still a "surprise"). And crashed with:

-> Failed: Dataset('/tmp/dew').create_sibling_gin(reponame='priv2', private=True, access_protocol='ssh')


(see error log for details)

only in the error log I see

ValueError: Credential 'gin.g-node.org' did not yield successful authorization

This is confusing, because I never set this value that happens to be no good.

I would expect it to fall back on asking whenever a credential was not specifically set. The same behavior I would expect, if a credential name was set, but actually did not exist: https://github.com/datalad/datalad-gooey/issues/341

bpoldrack commented 1 year ago

FTR: This is likely due to datalad-next's patch of create-sibling-ghlike. It's setting the credential name to netloc when none was given.

mih commented 1 year ago

That it determined a credential, and reported its name (or even assigns a name for a yet-to-be-saved credential based on netloc) is not a problem, from my POV.

The fact that I did not select a credential, but nevertheless did not get asked to provide a credential when no working one was found is a problem.