Problem
Docker Hub login fails in the terminal or Docker Desktop with this error:
Waiting for authentication in the browser… failed to store tokens: error storing credentials - err: exit status 1, out: `The user name or passphrase you entered is not correct. (-25293)`
error storing credentials - err: exit status 1, out: `The user name or passphrase you entered is not correct. (-25293)`
Docker uses the macOS Keychain to store credentials. If the login keychain is locked (common after a session timeout or machine wake), the credential store fails with error -25293.
Fix
Unlock the login keychain before logging in:
security unlock-keychain login.keychain
You will be prompted for your macOS user password. After unlocking, retry docker login or the Docker Desktop login flow.
Notes
- The keychain can lock automatically based on system idle settings or after the screensaver activates.
- This affects both
docker loginfrom the terminal and the Docker Desktop "Sign In" flow. - If the keychain is already unlocked and the error persists, try locking and unlocking it explicitly:
security lock-keychain login.keychain
security unlock-keychain login.keychain
