login-action
login-action copied to clipboard
Public ECR login issue on Windows
https://github.com/docker/login-action/actions/runs/5796019187/job/15708732154#step:3:14
Retrieving registries data through AWS SDK...
AWS Public ECR detected with us-east-1 region
Logging into public.ecr.aws...
Error: Error saving credentials: error storing credentials - err: exit status 1, out: `The stub received bad data.`
Looks similar to:
- https://github.com/aws/aws-cli/issues/5636
- https://github.com/docker/docker-credential-helpers/issues/190
For anyone with this issue, make sure you are using windows-2022 runners
https://docs.aws.amazon.com/powershell/latest/reference/items/Get-ECRLoginCommand.html
...
- name: Login AWS
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
- name: ECR
run: |
(Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin accountid.dkr.ecr.region.amazonaws.com
docker tag \
"someimage/service:tag" \
"accountid.dkr.ecr.region.amazonaws.com/service:tag"
docker push "accountid.dkr.ecr.region.amazonaws.com/service:tag"
...