-
Notifications
You must be signed in to change notification settings - Fork 723
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
How to set username for keyring cli based pip authorization (Azure artifacts) #2563
Comments
I think we just don't support this yet although we probably can! Can you share the keyring invocation we are performing and the other you would prefer? |
Okay thanks I can take a look into this unless @BakerNet is interested |
Thanks @zanieb In the second example you call keyring something like this (which would return None)
but I would need.
which correctly returns a token when I call it from the commandline |
I know why this is happening and can work on it. It's because of the early return in the middleware when the header is already added from the URL. If there is a username in the URL, but no password, it should be checking keyring and replacing the header if found.
|
The PR for this has been ready for a few days (#2570 ) I don't mean to rush, just an FYI in case it wasn't clear it's ready for review. |
Closes - #2822 - #2563 (via #2984) Partially address: - #2465 - #2464 Supersedes: - #2947 - #2570 (via #2984) Some significant refactors to the whole `uv-auth` crate: - Improving the API - Adding test coverage - Fixing handling of URL-encoded passwords - Fixing keyring authentication - Updated middleware (see #2984 for more)
Should be resolved by #2976 and available in the next release. |
For keyring authorization to work with Azure artifacts and the keyring CLI I have to supply a default username that must be
VssSessionToken
Trying to set this for UV in the same way as I would do for pip e.g.
results in no keyring operation probably because UV identifies the username as a password/token
It seems that pip supports that the form where only one part is given could be both username and a usernameless token but UV does not.
Using the default password on the other hand results in no response from keyring (can be confirmed by calling keyring directly)
If I manually rebuild uv with the default username changed from
oauth2accesstoken
toVssSessionToken
everything works correctly.Is there a different way I am supposed to embed the username?
System:
Windows 11
Python 3.12 conda env
uv 1.22
The text was updated successfully, but these errors were encountered: