amazon-ecr-login icon indicating copy to clipboard operation
amazon-ecr-login copied to clipboard

Login fails on windows

Open myakeen opened this issue 4 years ago • 4 comments

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.

myakeen avatar Nov 02 '20 16:11 myakeen

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

bulebuk avatar Nov 12 '20 02:11 bulebuk

I'm thinking the root issue may be https://github.com/docker/docker-credential-helpers/issues/190

feinoujc avatar Nov 12 '20 20:11 feinoujc

Any updates on this issue?

CSG-richard avatar May 26 '21 16:05 CSG-richard

Funnily enough, this action works for me, while docker/login-action fails: https://github.com/docker/login-action/issues/125

Vlaaaaaaad avatar Dec 18 '21 22:12 Vlaaaaaaad