amazon-ecr-login
amazon-ecr-login copied to clipboard
Login fails on windows
Currently experiencing issues on aws-actions/amazon-ecr-login@v1. via a build script using aws-actions/configure-aws-credentials@v1. The build was perfect as of 3 days ago. The error is:
Error: Could not login: WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error saving credentials: error storing credentials - err: exit status 1, out: The stub received bad data.
The virtual env info is
2020-11-02T15:08:23.2642617Z Microsoft Windows Server 2019
2020-11-02T15:08:23.2642970Z 10.0.17763
2020-11-02T15:08:23.2643321Z Datacenter
2020-11-02T15:08:23.2643642Z ##[endgroup]
2020-11-02T15:08:23.2644020Z ##[group]Virtual Environment
2020-11-02T15:08:23.2644535Z Environment: windows-2019
2020-11-02T15:08:23.2644904Z Version: 20201021.0
This wasn't happening as of 3 days ago and I believe this may be a related issue. Still haven't found any work around yet.
Here's my temporary workaround:
- name: Alternative Amazon ECR Login
id: login-ecr
run: |
echo '{"auths": {"https://index.docker.io/v1/": {}}, "HttpHeaders": { "User-Agent": "Docker-Client/19.03.12 (windows)"}}' > ~/.docker/config.json
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 1234567890.dkr.ecr.us-east-1.amazonaws.com
I'm thinking the root issue may be https://github.com/docker/docker-credential-helpers/issues/190
Any updates on this issue?
Funnily enough, this action works for me, while docker/login-action fails: https://github.com/docker/login-action/issues/125