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

Unauthorized keyring from Azure DevOps #3291

Closed
AndreuCodina opened this issue Apr 28, 2024 · 3 comments · Fixed by #3292
Closed

Unauthorized keyring from Azure DevOps #3291

AndreuCodina opened this issue Apr 28, 2024 · 3 comments · Fixed by #3292
Labels
compatibility Compatibility with another interface or tool

Comments

@AndreuCodina
Copy link

When I use the keyring authentication and try to install packages from a private registry in Azure DevOps, I receive 401 Unauthorized.
I log in with my Microsoft account with az login.
The installation currently works with pip instead of uv.

requirements.txt

sqlmodel==0.0.14
my-private-package==1.0.0

Execution:

$ uv --version
uv 0.1.39
$ uv pip install --system keyring artifacts-keyring
...

$ az login
...

$ uv pip install --system --extra-index-url=https://pkgs.dev.azure.com/mycompany/_packaging/MyFeed/pypi/simple --keyring-provider subprocess --requirement requirements.txt --verbose

DEBUG Starting interpreter discovery for default Python
DEBUG Cached interpreter info for Python 3.12.3, skipping probing: /usr/local/bin/python3
DEBUG Using Python 3.12.3 environment at /usr/local/bin/python3
DEBUG Trying to lock if free: /tmp/uv-39ee7c309557c5e9.lock
DEBUG Using registry request timeout of 30s
DEBUG Solving with target Python version 3.12.3
DEBUG Adding direct dependency: sqlmodel==0.0.14
DEBUG Adding direct dependency: my-private-package==1.0.0
DEBUG No cache entry for: https://pkgs.dev.azure.com/mycompany/_packaging/MyFeed/pypi/simple/sqlmodel/
DEBUG No cache entry for: https://pkgs.dev.azure.com/mycompany/_packaging/MyFeed/pypi/simple/my-private-package/
error: HTTP status client error (401 Unauthorized) for url (https://pkgs.dev.azure.com/mycompany/_packaging/MyFeed/pypi/simple/my-private-package/)

I've tried to generate a token and executing:

--extra-index-url=https:// mytokenname@ pkgs.dev.azure.com/mycompany/_packaging/MyFeed/pypi/simple

But I get the same result.

@charliermarsh
Copy link
Member

Hmm, strange. They return a 401 for a package that doesn't exist?

@charliermarsh
Copy link
Member

Are you able to try running from this branch? #3292

@charliermarsh charliermarsh added the compatibility Compatibility with another interface or tool label Apr 28, 2024
@AndreuCodina
Copy link
Author

Are you able to try running from this branch? #3292

How can I test it from that branch? I install uv with pip install uv.

charliermarsh added a commit that referenced this issue Apr 28, 2024
## Summary

It seems like Azure might return a 401 when you request a package that
doesn't exist (even with valid credentials)? But I admittedly haven't
tested this. (We already skip 403, and this seems similar?)

Closes #3291.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with another interface or tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants