WARNING! Your password will be stored unencrypted in /home/ashwini-gaddagi/.docker/config.json.
Configure a credential helper to remove this warning. See

Found of this error ? :p
Here is what I did to get my docker client working with docker-credentials-pass !

  1. Get the pass ( for Linux)
    wget https://github.com/docker/docker-credential-helpers/releases/download/v0.6.3/docker-credential-pass-v0.6.3-amd64.tar.gz
  2. Extract it
  3. change the permission
  4. Make it accessible ($PATH)
    tar -xvzf docker-credential-pass-v0.6.3-amd64.tar.gz && chmod +x docker-credential-pass && sudo mv docker-credential-pass /usr/local/bin/
  5. Check if its working :
    docker-credential-pass =>
    Usage: docker-credential-pass <store|get|erase|list|version>
  6. sudo apt-get install pass
  7. Create a new gpg2 key and follow the Prompts and remember what you did.
    gpg2 --gen-key
  8. Initialize pass using the newly created key
    pass init "<Your Name>"
  9. Add credsStore to your docker config.
    sed -i '0,/{/s/{/{\n\t"credsStore": "pass",/' ~/.docker/config.json
  10. Make sure you are logged out from the accounts.
  11. Login into the account
    By default it trys to login to dockerhub account because thats what the endpoint it has. To login to ECR get the token first and then login by pointing to the ECR endpoint .
    get the credentials !
    aws ecr get-login --no-include-email --region <region> --profile <your_profile> > ecr_login_pass.txt
    Note: It copies everything need to use sed command to copy just the password into the text file. The file should contain only password provided.
    login !
    cat ecr_login_pass.txt | docker login --username AWS --password-stdin <your_aws_ECR_account_url>
  12. Logout
    docker logout <your_aws_ECR_account_url>