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

Authentication when downloading package from private registry using oauth2accesstoken fails with 401 Unauthorized #1449

Closed
fellhorn opened this issue Feb 16, 2024 · 4 comments

Comments

@fellhorn
Copy link

Thanks a lot for this project, happy to see the so much progress in the python packaging ecosystem!

I tried to use uv with a private pip repository hosted in Google artifact registry:

> uv pip compile --extra-index-url https://oauth2accesstoken:$(gcloud auth print-access-token)@my-region-python.pkg.dev/my-project/my-repo/simple/ requirements.in

error: Failed to download: my-package==0.7.1
  Caused by: HTTP status client error (401 Unauthorized) for url (https://my-region-python.pkg.dev/my-project/my-repo/my-package/my-package-0.7.1-cp38-abi3-manylinux_2_28_x86_64.whl#sha256=my-sha)

This is the same both for uv pip install and uv pip compile.
It seems like the authentication for listing works (version 0.7.1 is read from the repo, I did not provide it), but the token is not used when downloading.

@gwdekker
Copy link

FWIW, I am seeing something very similar for a gitlab-hosted artifact registry. Same error.

@tfcace
Copy link

tfcace commented Feb 17, 2024

Probably related to #1458

@zanieb
Copy link
Member

zanieb commented Feb 23, 2024

Should be resolved in the latest version ref #1886

@zanieb zanieb closed this as completed Feb 23, 2024
@fellhorn
Copy link
Author

Thanks, I can confirm it works now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants