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

uv pip install fails with 403 whereas pip install works #10435

Closed
kressi opened this issue Jan 9, 2025 · 4 comments
Closed

uv pip install fails with 403 whereas pip install works #10435

kressi opened this issue Jan 9, 2025 · 4 comments
Labels
needs-mre Needs more information for reproduction question Asking for clarification or support

Comments

@kressi
Copy link

kressi commented Jan 9, 2025

I'm trying to uv pip install a project in GitBash and keep getting 403 from our internal PyPI. However, python -m pip install is working perfectly fine. I have configured pip.conf and uv.toml with equivalent settings. Is there anything I'm missing?

$ python -m uv pip install pip-install-test
Using Python 3.12.4 environment at: C:\Program Files\python
  × No solution found when resolving dependencies:
  ╰─▶ Because pip-install-test was not found in the package registry and you require pip-install-test, we can conclude that your requirements are unsatisfiable.

      hint: An index URL (https://internal.company.domain/repository/public-pypi/simple) could not be queried due to a lack of valid authentication credentials (403 Forbidden).
$ python -m pip install pip-install-test
Collecting pip-install-test
  Downloading pip_install_test-0.5-py3-none-any.whl.metadata (979 bytes)
Downloading pip_install_test-0.5-py3-none-any.whl (1.7 kB)
Installing collected packages: pip-install-test
Successfully installed pip-install-test-0.5

[notice] A new release of pip is available: 24.1.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

Environment

$ git --version
git version 2.47.0.windows.2
$ uv --version
uv 0.5.16 (333f03f11 2025-01-08)
$ cat $UV_CONFIG_FILE
link-mode = "copy"
allow-insecure-host = ["internal.company.domain"]

[[index]]
name = "pypi"
url = "https://internal.company.domain/repository/public-pypi/simple"
default = true
$ cat ~/pip.conf
[global]
index-url = https://internal.company.domain/repository/public-pypi/simple
trusted-host = internal.company.domain
@zanieb
Copy link
Member

zanieb commented Jan 9, 2025

Where are the credentials coming from with pip? Are you using a pypirc file or keyring?

@zanieb zanieb added the question Asking for clarification or support label Jan 9, 2025
@kressi
Copy link
Author

kressi commented Jan 9, 2025

There are no credentials for the index

@zanieb
Copy link
Member

zanieb commented Jan 9, 2025

Can't say why your server would return a 403 then, I think you'll need to get more details. You can use --verbose or RUST_LOG=uv=trace to get more logs from uv and details about the failing request (see #9452).

@zanieb zanieb added the needs-mre Needs more information for reproduction label Jan 9, 2025
@kressi
Copy link
Author

kressi commented Jan 10, 2025

Thank you, turned out pip and uv have not been properly configured for Windows. RUST_LOG=uv=trace has helped recognizing this.

Btw. thanks for your work on uv. It's improving user experience with python significantly. ❤

@kressi kressi closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-mre Needs more information for reproduction question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants