uv icon indicating copy to clipboard operation
uv copied to clipboard

fix: prefer env var credentials over index URL username; guard cache & git-store; add tests

Open MarthinusBosman opened this issue 2 weeks ago • 0 comments

Summary

Ensure environment credentials take precedence when resolving private registry credentials. When both an index URL and environment variables (e.g. UV_INDEX_PRIVATE_REGISTRY_USERNAME / UV_INDEX_PRIVATE_REGISTRY_PASSWORD) provide credentials, prefer the environment variables and avoid overwriting cached credentials with URL-derived username. Adds unit tests for the precedence behavior and updates docs/references. Closes #16733.

Test Plan

  • Added unit tests that assert env username/password override credentials derived from an index URL.
  • Ran cargo nextest run locally; all tests pass.

MarthinusBosman avatar Nov 15 '25 17:11 MarthinusBosman