Error saving credentials Docker Origin: Platform & cloud Last updated 15 Oct 2026

Error saving credentials: error storing credentials - err: exit status 1

docker login authenticated, but the credential helper (keychain, pass, wincred) couldn’t store the password.

Exact message you may see Error saving credentialserror storing credentialsThe user name or passphrase you entered is not correct
Seen on: Docker

Meaning

Common on headless Linux (pass/secretservice not set up), locked macOS keychains over SSH, and WSL.

Common causes

  • Credential helper not initialised (pass without a GPG key)
  • Keychain locked or unavailable (SSH session)
  • Helper mismatch from another Docker install

⚡ Quick fix

  1. Remove credsStore so credentials are stored in config.json (base64, less secure)
  2. Initialise the helper (pass init <gpg-id>)
  3. Unlock the keychain

Detailed fix by platform

Shell

  1. bash
    security unlock-keychain ~/Library/Keychains/login.keychain-db   # macOS over SSH
    pass init "<gpg-key-id>"                                     # Linux pass helper

How to diagnose

  1. Helper — credsStore value
  2. State — Is the keychain/pass store usable?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

AADSTS50126 — AADSTS50126: Error validating credentials due to invalid username or password (Azure)AADSTS50126AADSTS90002 — AADSTS90002: Tenant 'x' not found (Azure)AADSTS90002auth/invalid-credential — Firebase Auth: auth/invalid-credential (auth/wrong-password, auth/user-not-found, auth/invalid-login-credentials) (Authentication)auth/invalid-credenti…bad auth : Authentication failed — MongoDB: MongoServerError: bad auth : Authentication failed (code 8000 / 18) (MongoDB)bad auth : Authentica…ConnectionString property has not been initialized — InvalidOperationException: The ConnectionString property has not been initialized (.NET)ConnectionString prop…Could not load the default credentials — Google Cloud: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started (Google Cloud / Firebase)Could not load the de…DefaultAzureCredential failed — DefaultAzureCredential failed to retrieve a token from the included credentials / ManagedIdentityCredential authentication unavailable (Azure)DefaultAzureCredentia…denied — denied: requested access to the resource is denied (docker push) (Docker)deniedError sav…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.