Add extra-index-url support for CodeArtifact login with --tool pip
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
**Is your feature request related to a problem? Please describe.**
Running `aws codeartifact login --tool pip ...` overrides the default index url (pypi.org), which becomes an issue if CodeArtifact becomes out of sync (a separate issue)
**Describe the solution you'd like**
Add an `--extra-index-url` flag to put the CodeArtifact URL in (only necessary for `--tool pip`)
Should be as easy as changing `global.index-url` to `global.extra-index-url` if the flag is passed: https://github.com/aws/aws-cli/blob/develop/awscli/customizations/codeartifact/login.py#L157
**Describe alternatives you've considered**
Currently setting the url "manually":
```bash
CODEARTIFACT_TOKEN=$(aws codeartifact get-authorization-token --domain ... --domain-owner ... --query authorizationToken --output text)
pip config set global.extra-index-url https://aws:$CODEARTIFACT_TOKEN@...-....d.codeartifact.us-east-1.amazonaws.com/pypi/.../simple/
```
Contributor guide
Assessment
This issue has not been assessed yet.