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

Enable environment variable authentication for named indexes #7741

Open
wants to merge 1 commit into
base: charlie/index-api
Choose a base branch
from

Conversation

charliermarsh
Copy link
Member

Summary

This PR enables users to provide index credentials via named environment variables.

For example, given an index named internal that requires a username (public) and password
(koala), you can define the index (without credentials) in your pyproject.toml:

[[tool.uv.index]]
name = "internal"
url = "https://pypi-proxy.corp.dev/simple"

Then set the UV_INDEX_INTERNAL_USERNAME and UV_INDEX_INTERNAL_PASSWORD
environment variables, where INTERNAL is the uppercase version of the index name:

export UV_INDEX_INTERNAL_USERNAME=public
export UV_INDEX_INTERNAL_PASSWORD=koala

@charliermarsh charliermarsh force-pushed the charlie/index-api-environment-vars branch from cd3ae91 to e90683c Compare September 28, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
registry Related to package indexes and registries security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant