-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
UV_EXTRA_INDEX_URL not taking precedence over persistent configuration (pyproject.toml) #8248
Comments
I don't think that
|
ARG is like an environment variable, but for the build stage. Anyway, I've tried 2 approaches with the same result I describe:
Unless I remove the pyproject.toml configuration, I can't download the package. |
Sort of... But it won't be picked up by If you add |
With the
|
That part looks right at least, in that |
Can you include the |
|
We might be "preferring" the auth in the |
I think this could plausibly be fixed by #8256. |
The documentation (https://docs.astral.sh/uv/configuration/files/) says: "Settings provided via environment variables take precedence over persistent configuration, and settings provided via the command line take precedence over both".
I use a private registry (Azure DevOps), and to develop locally, pyproject.toml uses keyring authentication:
But when I create a Dockerfile and disable that configuration with environment variables to use the token, then it can't get the package from the private registry:
docker build \ --tag my-image:1.0.0 \ --build-arg UV_EXTRA_INDEX_URL=https://token@pkgs.dev.azure.com/mycompany/_packaging/MyFeed/pypi/simple/ \ .
Error:
Caused by: Failed to fetch wheel: my-private-package
But if I remove
extra-index-url
from pyproject.toml and build the Dockerfile, then it can get the package. In fact, it works even if I don't removekeyring-provider
.The text was updated successfully, but these errors were encountered: