docker/cli ยท error
error saving credentials: %v
Error message
error saving credentials: %v
What it means
Error "error saving credentials: %v" thrown in docker/cli.
Source
Thrown at cli/command/registry/login.go:334
return "", err
}
return response.Auth.Status, nil
}
func storeCredentials(cfg *configfile.ConfigFile, authConfig registrytypes.AuthConfig) error {
creds := cfg.GetCredentialsStore(authConfig.ServerAddress)
if err := creds.Store(configtypes.AuthConfig{
Username: authConfig.Username,
Password: authConfig.Password,
ServerAddress: authConfig.ServerAddress,
// TODO(thaJeztah): Are these expected to be included?
Auth: authConfig.Auth,
IdentityToken: authConfig.IdentityToken,
RegistryToken: authConfig.RegistryToken,
}); err != nil {
return fmt.Errorf("error saving credentials: %v", err)
}
return nil
}
func loginWithRegistry(ctx context.Context, apiClient client.SystemAPIClient, options client.RegistryLoginOptions) (client.RegistryLoginResult, error) {
res, err := apiClient.RegistryLogin(ctx, options)
if err != nil {
if client.IsErrConnectionFailed(err) {
// daemon isn't responding; attempt to login client side.
return loginClientSide(ctx, options)
}
return client.RegistryLoginResult{}, err
}
return res, nil
}
View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/registry/login.go:334 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/71bd2d370067dbb6.json.
Report an issue: GitHub.