Skip to content

docs(libraries): document UV_INDEX env vars for uv authentication#3531

Merged
s-stumbo merged 2 commits into
chainguard-dev:mainfrom
doismellburning:docs/uv-index-env-vars
Jul 17, 2026
Merged

docs(libraries): document UV_INDEX env vars for uv authentication#3531
s-stumbo merged 2 commits into
chainguard-dev:mainfrom
doismellburning:docs/uv-index-env-vars

Conversation

@doismellburning

Copy link
Copy Markdown
Member

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 with uv.

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). uv has 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.md uv "Using direct access" section leads with the UV_INDEX_CHAINGUARD_USERNAME / UV_INDEX_CHAINGUARD_PASSWORD approach and includes an example index config using authenticate = "always".
  • access.md "Use environment variables for pull token credentials" section includes a callout showing how to map CHAINGUARD_PYTHON_IDENTITY_ID / CHAINGUARD_PYTHON_TOKEN to uv's index-scoped env var names.

How should this PR be tested?

  • Create a pull token (chainctl auth pull-token --output env --repository=python --parent=<org>).
  • Export UV_INDEX_CHAINGUARD_USERNAME and UV_INDEX_CHAINGUARD_PASSWORD from the returned values.
  • Configure a uv.toml or pyproject.toml with a named chainguard index pointing at https://libraries.cgr.dev/python/simple/ and authenticate = "always", with no credentials in the file.
  • Run uv sync on a project with a Chainguard-available dependency and confirm it resolves successfully.

@doismellburning
doismellburning requested a review from a team as a code owner July 8, 2026 12:41
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for ornate-narwhal-088216 ready!

Name Link
🔨 Latest commit 3aa982d
🔍 Latest deploy log https://app.netlify.com/projects/ornate-narwhal-088216/deploys/6a5a493c5fd2700008985f08
😎 Deploy Preview https://deploy-preview-3531--ornate-narwhal-088216.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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
doismellburning force-pushed the docs/uv-index-env-vars branch from fc31a41 to b4b5efe Compare July 8, 2026 12:55
@doismellburning

Copy link
Copy Markdown
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
s-stumbo merged commit dac1213 into chainguard-dev:main Jul 17, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants