Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.8K
Views
docker login: error storing credentials `The stub received bad data.`

First, I installed AWS-CLI and I already used "AWS configure" to set up my secret key and I also used "Docker login" command to log in and I got success and when I typed Get-ECRLoginCommand. It works and returns the result for me.

But when I try to use the command :

(Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin 837859123533.dkr.ecr.ap-east-1.amazonaws.com/spring-boot

I got an error that looks like this:

Error saving credentials: error storing credentials - err: exit status 1, out: error storing credentials - err: exit status 1, out:The stub received bad data.``

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Edit: Also see Ethan Davis's solution:

I found that removing C:\Program Files\Docker\Docker\resources\bin\docker-credential-desktop.exe and C:\Program Files\Docker\Docker\resources\bin\docker-credential-wincred.exe worked for me. – Ethan Davis Sep 29 '20 at 18:10


Original: The solution linked by Joelster's comment worked for me.

One quick workaround is to modify .docker\config.json file. Remove the following line so docker will use file system to store tokens:

          "credsStore": "wincred"

I opened the file c:\Users\sashoalm\.docker\config.json, and I deleted the "credsStore" key. After that this worked:

type pass.txt | docker login -u AWS --password-stdin https://123123.dkr.ecr.us-west-1.amazonaws.com

And the output was this:

WARNING! Your password will be stored unencrypted in C:\Users\sashoalm\.docker\config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
over 4 years ago · Santiago Trujillo Report

0

As of today's date, this issue still persists. Below are the things I discovered-

1.) This problem shows up while using SSOs for authentication. I am using Azure SSO for AWS.(https://www.npmjs.com/package/aws-azure-login)

2.) The reason is- The token returned from SSOs is long enough(more than 2550 characters) where as windows credential manager does not support such long tokens.

3.) If you use ECR credential helper (https://github.com/awslabs/amazon-ecr-credential-helper), sadly it also does not seem to work with SSOs- https://github.com/awslabs/amazon-ecr-credential-helper/issues/229

However, I followed these steps as a workaround & I'm on Windows-

1.) Remove/Rename the "docker-credential-wincred.exe" file located in "C:\Program Files\Docker\Docker\resources\bin" directory.

2.) Remove the "credStore" & "credsStore" keys from the docker config(C:\Users\PROFILE_NAME\.docker\config.json).

I get the following response-

WARNING! Your password will be stored unencrypted in C:\Users\sandeep.kumar\.docker\config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
  • Tickets opened to address this issue-

https://github.com/danieljoos/wincred/issues/18

https://github.com/aws/aws-cli/issues/5636

over 4 years ago · Santiago Trujillo Report

0

As @Ethan Davis mentioned, removing the following files helped me:

  • C:\Program Files\Docker\Docker\resources\bin\docker-credential-desktop.exe
  • C:\Program Files\Docker\Docker\resources\bin\docker-credential-wincred.exe
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!