Docker login works
I believe I have given my user the correct permissions in AWS
I can create a repository in AWS ok: aws ecr create-repository --repository-name jenkins (for example) so I know I’m authenticated to my AWS account (and region) correctly. However, I can’t seem top push ANY images to AWS ECR. Fails every time with “no basic auth credentials”
Can anyone help or point me in the right direction ?
The solution therefore is to use the following wrapper to log in: eval $(aws ecr get-login | sed 's|https://||')
This command gets the login command, replaces https:// with `` (empty string) and evaluates the resulting command. This will store the received key under the correct server and you can use it for docker push.
In the above path this is where I’ve done the mistake: “dkr.ecr.us-east-1.amazonaws.com” instead of “west”. I was using “east”. Once I corrected my mistake, I was able to push the image succesfully.
Hi Guys, I got into the same issue like the other guys mentioned above. I’m getting “no basic auth credentials” when I tried to push my docker images to AWS ECR. I’m using docker toolbox -version 1.13.0, build 49bf474 on Windows 7. I followed the below steps to configure my docker cli with AWS ECR.
I see the message “Login succeeded”. Also, config.json got updated with this auth key.
When I tried push the docker image using docker --config=config.json push .dkr.ecr.us-west-2.amazonaws.com/imagename:version, it failed with “no basic auth credentials”
23c0d04a137: Waiting
fe4c16cbf7a4: Waiting
no basic auth credentials
the credentials are the problem, the solution is to set them. in the error messages you may notice the statement that says run aws credentials. I just spotted it on my terminal!
try aws configure
If it not too late, after scratching my head around this issue, the solution was just to copy and paste the output of aws ecr get-login --no-include-email --region ***** which of the form docker *** and some very long alpha-numeric passphrase. It is kind of like your credentials for your repo. Do not put your DockerHub credentials as it won’t just work.