What This Error Means
Docker registry authentication failed because no valid credentials were sent, so you need to log in or fix the token used for that registry.
How to Fix It
Login to the exact registry host shown in the image reference:docker login <registry>
If this happens in CI, print the registry host and confirm the secret variables are present before the login step.
If you use a cloud registry, fetch a fresh short-lived token and retry the login.
If credentials are stored locally, run docker logout <registry> and then log in again so Docker refreshes the stored credential.
Why It Happens
You are not logged in to the target registry host.
CI did not inject the expected token or password into docker login.
The credential helper is not returning credentials for the registry you are talking to.
How to Verify
Retry the pull or push and confirm the registry no longer returns authentication required.
Run a simple authenticated operation against the same registry and repository path.
Manual authentication checks
Print the exact registry host from the image reference.
Check ~/.docker/config.json and confirm the host is covered by either auths or your configured credential helper.
If CI is involved, confirm the login step actually ran before the failing pull or push.
Examples
unauthorized: authentication required How registry authentication works
Docker sends registry credentials based on the registry host in the image reference.
If no valid credentials are available for that host, the registry rejects the request before Docker can read manifests or layers.
Prevention Tips
Keep registry hostnames explicit in scripts instead of relying on ambiguous defaults.
Use automation tokens for CI and rotate them regularly.
Document which credential helper or secret source each environment uses.