docker-credential-helpers icon indicating copy to clipboard operation
docker-credential-helpers copied to clipboard

pass: "exec format error" when trying to login into AWS ECR

Open erich-wittenbeck opened this issue 1 year ago • 2 comments

Greetings! I try to register for the AWS Elastic Container Registry to push my Docker images there.

I tried to use docker-credential-pass, which I downloaded from the Releases-Page (latest version), which I saved under /usr/local/bin/

and configured the ~/.docker/config.json like so:

{
        "credsStore": "pass"
}

When I now execute the premade command for logging into the ECR Repository of my AWS Account:

aws ecr get-login-password --region <my-region> | docker login --username AWS --password-stdin <my-account-id>.dkr.ecr.<my-region>.amazonaws.com

...I get the following error message:

Error saving credentials: error storing credentials - err: fork/exec /usr/local/bin/docker-credential-pass: exec format error, out: ``

So far, I couldn't find anything on that error message.

I'd be gratefull for any help!

erich-wittenbeck avatar Feb 18 '24 16:02 erich-wittenbeck

Ok, so everything seems to be working, when I build docker-credential-pass myself using docker (according to instructions in the main Readme).

Though I'm still wondering, why the executable from the Releases-Page did not work.

erich-wittenbeck avatar Feb 18 '24 17:02 erich-wittenbeck

"exec format error" usually means you downloaded a binary for the wrong OS or architecture

nicks avatar Feb 18 '24 18:02 nicks