docs(libraries): document UV_INDEX env vars for uv authentication#3531
Merged
s-stumbo merged 2 commits intoJul 17, 2026
Merged
Conversation
✅ Deploy Preview for ornate-narwhal-088216 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Add uv's native index-scoped environment variable support (UV_INDEX_<NAME>_USERNAME / UV_INDEX_<NAME>_PASSWORD) as the recommended credential approach for CI/CD — avoiding hardcoded credentials in config files without requiring .netrc. Covered in both the Python build-configuration uv section and the access.md environment variables section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Kristian Glass <kristian.glass@chainguard.dev>
doismellburning
force-pushed
the
docs/uv-index-env-vars
branch
from
July 8, 2026 12:55
fc31a41 to
b4b5efe
Compare
Member
Author
|
I don't know if you necessarily want this or if this is your preferred place/style, but the option itself was useful to me when experimenting with local direct-access setups |
s-stumbo
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Documentation addition.
What should this PR do?
Document
uv's native index-scoped environment variables (UV_INDEX_<NAME>_USERNAME/UV_INDEX_<NAME>_PASSWORD) as an authentication option when using Chainguard Libraries for Python withuv.Why are we making this change?
The existing docs present two options for uv direct-access authentication: embed credentials in the index URL (insecure, problematic in version-controlled files) or use
.netrc(requires a file on disk).uvhas a third native option — index-scoped environment variables — that works well for CI/CD and shared configs without either tradeoff. This was missing from the docs.What are the acceptance criteria?
build-configuration.mduv "Using direct access" section leads with theUV_INDEX_CHAINGUARD_USERNAME/UV_INDEX_CHAINGUARD_PASSWORDapproach and includes an example index config usingauthenticate = "always".access.md"Use environment variables for pull token credentials" section includes a callout showing how to mapCHAINGUARD_PYTHON_IDENTITY_ID/CHAINGUARD_PYTHON_TOKENto uv's index-scoped env var names.How should this PR be tested?
chainctl auth pull-token --output env --repository=python --parent=<org>).UV_INDEX_CHAINGUARD_USERNAMEandUV_INDEX_CHAINGUARD_PASSWORDfrom the returned values.uv.tomlorpyproject.tomlwith a namedchainguardindex pointing athttps://libraries.cgr.dev/python/simple/andauthenticate = "always", with no credentials in the file.uv syncon a project with a Chainguard-available dependency and confirm it resolves successfully.