Skip to content

Docker login fails returning "The stub received bad data" on Windows when using awscli v2.  #5636

@overbit

Description

@overbit

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Authenticate Docker to an Amazon ECR registry with get-login-password fails with the following error:
Error saving credentials: error storing credentials - err: exit status 1, out: 'The stub received bad data.'

SDK version number
aws-cli/2.0.56 Python/3.7.7 Windows/10 exe/AMD64

Platform/OS/Hardware/Device
Windows 10 1909
Docker Desktop 2.4.0

To Reproduce (observed behavior)

  1. Have an ECR repository setup
  2. Authenticate docker to pull and push images from the repository using the authorization token:
    aws ecr get-login-password --region <specific-region> | docker login --username AWS --password-stdin <myaccount>.dkr.ecr. <specific-region>.amazonaws.com

Expected behavior
Login should be successful

Additional context
I'm currently using an aws profile configured with AWS SSO

aws ecr get-login-password --region <specific-region> command alone succeed returning a token.
This token might be too big for docker login to accept?

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerIssue involves the AWS CLI Docker container imagedocumentationThis is a problem with documentation.ecrp2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions