Skip to content

[Bug]: registry login fails with AWS ECR #847

@sebsto

Description

@sebsto

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Following AWS doc to get obtain a public access token for AWS Elastic Registry (ECR) fails with container (main branch)

To reproduce:

  1. Have an AWS account.
  2. install and configure the CLI
  3. Follow instructions at
    https://docs.aws.amazon.com/linux/al2023/ug/base-container.html
aws ecr-public get-login-password --region us-east-1 | container registry login --username AWS --password-stdin public.ecr.aws

Warning! Running debug build. Performance may be degraded.
Error: HTTP request to https://public.ecr.aws/v2/ failed with response: 400 Bad Request. Reason: {"errors":[{"message":"Your Authorization Token is invalid.","code":"DENIED"}]}

Current behavior

registration fails with Your Authorization Token is invalid error message.

Expected behavior

Should allow to authenticate.

The same command with docker works.

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
Login Succeeded

Environment

- OS: 26.0.1
- Xcode: 26.1
- Container: 

Warning! Running debug build. Performance may be degraded.
container CLI version 0.6.0-11-g62721e7 (build: debug, commit: 62721e7)

Relevant log output

Can't use `debug` mode 


aws ecr-public get-login-password --region us-east-1 | container registry login --username AWS --password-stdin --debug public.ecr.aws
Warning! Running debug build. Performance may be degraded.
Error: Unknown option '--debug'. Did you mean '--debug'?
Usage: container registry login [--scheme <scheme>] [--password-stdin] [--username <username>] [--debug] <server>
  See 'container registry login --help' for more information.
Exception ignored on flushing sys.stdout:
BrokenPipeError: [Errno 32] Broken pipe

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions