uv icon indicating copy to clipboard operation
uv copied to clipboard

Enable persistent configuration of authenticated index URL

Open charliermarsh opened this issue 1 year ago • 0 comments

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:

  1. Retrieve an Authorization Token (https://docs.aws.amazon.com/cli/latest/reference/codeartifact/get-authorization-token.html).
  2. Add a repository URL to Poetry (https://python-poetry.org/docs/configuration/#repositoriesnameurl)
  3. 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.

charliermarsh avatar Dec 14 '23 18:12 charliermarsh