uv
uv copied to clipboard
uv pip install HTTP status client error (405 Method Not Allowed) for private azure package index
Hello! Very excited for this project ❤️
Installing a package from a private azure package index (Azure Artifacts) seems to be failing with a HTTP status client error (405 Method Not Allowed):
uv pip install --extra-index-url "https://<FEED_NAME>:<PERSONAL_ACCESS_TOKEN>@pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/<FEED_NAME>/pypi/simple/" package-name
error: Failed to download: package-name==X.Y.Z
Caused by: HTTP status client error (405 Method Not Allowed) for url (pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/.../pypi/download/package-name/X.Y.Z/package_name-X.Y.Z-py3-none-any.whl#[sha256=])
The equivalent pip-native command works as expected
python -m pip install --extra-index-url "https://<FEED_NAME>:<PERSONAL_ACCESS_TOKEN>@pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/<FEED_NAME>/pypi/simple/" package-name
Thank you! Will take a look.
Same here - Really want to test (and replace pip with) uv but waiting for Azure artifacts support :( !
Thanks and sorry about that -- we'll get this setup internally and see if we can reproduce.
Yep this is a priority for me next week!
+1. Same issue for me.
I believe this is the same as https://github.com/astral-sh/uv/issues/1458 (lack of support for HEAD requests).
Okay, @olivierlefloch fixed HEAD requests, but there's now an auth problem. @zanieb, do you want to take from here?
Thank you all!
I can confirm that on uv 0.1.6 this is no longer giving 405 Method Not Allowed but a 401 Unauthorized
uv pip install --extra-index-url "https://<FEED_NAME>:<PERSONAL_ACCESS_TOKEN>@pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/<FEED_NAME>/pypi/simple/" package-name
error: Failed to download: package-name==X.Y.Z
Caused by: HTTP status client error (401 Unauthorized) for url (pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/.../pypi/download/package-name/X.Y.Z/package_name-X.Y.Z-py3-none-any.whl#[sha256=])
Same for gitlab hosted private package index: getting a 401 Unauthorized. Interestingly, opening the URL in the error message in the browser downloads the package for me without a problem. the url looks like this:
https://gitlab.com/api/v4/groups/<GROUP_NR>/-/packages/pypi/files/<SOME_LONG_HASH>/<PKG_NAME>-py3-none-any.whl#sha256=<PKG_SHA>
Hi! We just merged a fix with #1874 that's out in v0.1.8 — let me know if that helps. I'll continue testing against various private repositories.
Thank you @zanieb! At least for Azure Artifacts, I am still seeing the same error on 0.1.8 (401 Unauthorized)
Same here, 401 Unauthorized for Azure Artifacts with uv 0.1.8
For my own sanity, note this is also being tracked in https://github.com/astral-sh/uv/issues/1709
A fix is up at https://github.com/astral-sh/uv/pull/1886 if anyone wants to give it a try against a private index.
Verified working on azure artifacts feed using token authentication!!
Incredible work @zanieb, @olivierlefloch and @charliermarsh 🚀
I can confirm as well ❤️ Thank you so much!