Docker login fails returning "The stub received bad data" on Windows when using awscli v2.
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x] I've gone though the [User Guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) and the [API reference](https://docs.aws.amazon.com/cli/latest/reference/)
- [x] I've searched for [previous similar issues](https://github.com/aws/aws-cli/issues) and didn't find any solution
**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 | docker login --username AWS --password-stdin .dkr.ecr. .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 ` command alone succeed returning a token.
This token might be too big for docker login to accept?
Contributor guide
Assessment
This issue has not been assessed yet.