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

**Code:** `Error saving credentials` · **Category:** Docker · **Seen on:** Docker

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/docker/error-saving-credentials)
