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?
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:
Open C:\Users\<username>\.docker\config.json
In Terminal (windows 11 command prompt), type:
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/xxxxxxxx
2 important things, [ecr-public] and region [us-east-1] even that i'm working with a different region
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.