uv
uv copied to clipboard
Enable persistent configuration of authenticated index URL
For users of AWS CodeArtifact and other similar services, we need a way for users to provide and persist authentication credentials that lives outside of the project.
You can see an example in CodeArtifact's pip documentation, where they suggest:
pip config set site.index-url https://aws:$CODEARTIFACT_AUTH_TOKEN@my_domain-111122223333.d.codeartifact.region.amazonaws.com/pypi/my_repo/simple/
Similarly, Poetry users tend to do something like:
- Retrieve an Authorization Token (https://docs.aws.amazon.com/cli/latest/reference/codeartifact/get-authorization-token.html).
- Add a repository URL to Poetry (https://python-poetry.org/docs/configuration/#repositoriesnameurl)
- Configure that repository to use an authorization token (https://python-poetry.org/docs/configuration/#http-basicnameusernamepassword) via, e.g.,
poetry config http-basic.$CODE_ARTIFACT_DOMAIN aws $CODE_ARTIFACT_AUTH_TOKEN.