Skip to content

AWS codeartifact login does not set pypi registry #8168

@MauriceHeinze

Description

@MauriceHeinze

Describe the bug

I'm not able to set the pypi index/package source with the AWS codeartifact login. AWS codeartifact list-packages works like a charm.

Expected Behavior

Expected "You're logged in" message and pypi using codeartifact

Current Behavior

aws codeartifact login --tool pip --repository XXX --domain XXX --domain-owner XXX --region XXX --profile XXX

Command '['pip', 'config', 'set', 'global.index-url', 'https://aws:eyJ...elQ@XXX-domain-XXX.d.codeartifact.XXX.amazonaws.com/pypi/XXX/simple/']' returned non-zero exit status 1.

Reproduction Steps

  1. Install AWS ClI on Windows 10
  2. Setup profile using aws configure sso
  3. run aws codeartifact list-packages --domain XXX --domain-owner XXX--repository XXX --profile AWSCodeArtifactReadOnlyAccess-XXX to make sure you got the permissions to read
  4. run aws codeartifact login --tool pip --repository XXX --domain XXX --domain-owner XXX --region XXX --profile XXX
  5. Get the error

Possible Solution

No response

Additional Information/Context

Tried it with admin profile as well, still doesn't work

CLI version used

aws-cli/2.13.17

Environment details (OS name and version, etc.)

Python/3.11.5 Windows/10 exe/AMD64 prompt/off
pip/23.2.1

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions