I use this command to get AWS ECR login token
aws ecr get-login --no-include-email --region ap-southeast-1
After that i run docker login using the output from aws command
sudo docker login -u AWS -p eyJwYX****** https://****8010.dkr.ecr.ap-southeast-1.amazonaws.com
But the result is
Error saving credentials: error storing credentials - err: exec: "docker-credential-pass": executable file not found in $PATH, out: ``
I really don't have any idea how to fix this error i try search everywhere but still no luck
Try the following steps to fix your docker-credential-pass:
Install docker-credential-pass
wget https://github.com/docker/docker-credential-helpers/releases/download/v0.6.0/docker-credential-pass-v0.6.0-amd64.tar.gz
tar -xf docker-credential-pass-v0.6.0-amd64.tar.gz
chmod +x docker-credential-pass
sudo mv docker-credential-pass /usr/local/bin/
Setup pass and gpg
sudo apt-get update
sudo apt-get install -y pass gpg
gpg2 --gen-key
pass init "<PASTE THE GPG-ID>"
pass insert docker-credential-helpers/docker-pass-initialized-check
(Set it as "pass")
pass show docker-credential-helpers/docker-pass-initialized-check
docker-credential-pass list
(You should not see "pass store is uninitialized")
Add the credsStore line to your ~/.docker/config.json
{
"auths": {
**SKIPPED**
},
"credsStore": "pass"
}
Then you should be able to login.