amazon-web-servicesamazon-ecr

Windows 11 - Docker PUSH - AWS ECR - 401 Unauthorized


I cannot push image to aws ecr.

I successfully run all related commands:

BUT when i push the image, the command returns:

unknown: unexpected status from HEAD request to https://public.ecr.aws/v2/xxxxxxxx/repoxxx/blobs/sha256:cd9325c31137fac0d5e581ad0c3d85807aca57f4634f837e89e889109a62f215: 401 Unauthorized

The user I am using has the [AdministratorAccess] policy within AWS IAM.

Please, what else can i do to solve this issue?


Solution

  • Sorry, i didn't mention that a was trying to Push to a PUBLIC Repo.

    As i using now Windows 11, i realize that doing theses steps worked for me now:

    After the command above, i receive:

    WARNING! Your credentials are stored unencrypted in 'C:\Users\<username>\.docker\config.json'.

    Configure a credential helper to remove this warning. See

    https://docs.docker.com/go/credential-store/

    Login Succeeded

    Then i can PUSH the image to the PUBLIC ECR.