{"record":{"id":"a3e7ca0774a9f492","repo":"opentofu/opentofu","slug":"from-q-credential-helper-w","errorCode":null,"errorMessage":"from %q credential helper: %w","messagePattern":"from %q credential helper: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/command/cliconfig/ociauthconfig/credentials_source.go","lineNumber":66,"sourceCode":"\nfunc (s *staticCredentialsSource) credentialsSourceImpl() {}\n\ntype dockerCredentialHelperCredentialSource struct {\n\thelperName string\n\tserverURL  string\n\tspec       CredentialsSpecificity\n}\n\nvar _ CredentialsSource = (*dockerCredentialHelperCredentialSource)(nil)\n\nfunc (s *dockerCredentialHelperCredentialSource) CredentialsSpecificity() CredentialsSpecificity {\n\treturn s.spec\n}\n\nfunc (s *dockerCredentialHelperCredentialSource) Credentials(ctx context.Context, env CredentialsLookupEnvironment) (Credentials, error) {\n\tresult, err := env.QueryDockerCredentialHelper(ctx, s.helperName, s.serverURL)\n\tif err != nil {\n\t\treturn Credentials{}, fmt.Errorf(\"from %q credential helper: %w\", s.helperName, err)\n\t}\n\treturn Credentials{\n\t\tusername: result.Username,\n\t\tpassword: result.Secret,\n\t\t// Docker-style credential helpers cannot produce OAuth credentials\n\t}, nil\n}\n\nfunc (s *dockerCredentialHelperCredentialSource) credentialsSourceImpl() {}\n","sourceCodeStart":48,"sourceCodeEnd":76,"githubUrl":"https://github.com/opentofu/opentofu/blob/3561785c48c1ce615e7c50261bd351f26053efa2/internal/command/cliconfig/ociauthconfig/credentials_source.go#L48-L76","documentation":"A Docker credential helper source (from a 'credHelpers' entry, an 'auths' credHelpers mapping, a default_docker_credential_helper, or an explicit docker_credential_helper argument) tried to obtain credentials by querying the helper program for serverURL 'https://<registryDomain>' and the helper interaction failed. The wrapped error from QueryDockerCredentialHelper carries the actual cause: helper missing, helper crash, or 'credentials not found' for that server.","triggerScenarios":"env.QueryDockerCredentialHelper returns an error: the docker-credential-* binary is not installed/not on PATH, the helper exits non-zero, or it reports no credentials for https://<domain>. Any of these is wrapped as 'from \"<helperName>\" credential helper: ...'.","commonSituations":"config.json references docker-credential-desktop or docker-credential-wincred on a machine without Docker Desktop; helper config copied between OSes; expired helper credentials in CI; 'credsStore' entry pointing at a helper that was uninstalled.","solutions":["Read the wrapped message: 'not found' vs 'exec: not found' vs a helper-specific message point to different fixes","Install the missing helper binary (e.g. docker-credential-pass, docker-credential-desktop) and ensure it is on PATH","Re-authenticate: docker login <registry> to refresh what the helper stores","Remove the stale 'credsStore'/'credHelpers' entry from the Docker config if that helper is gone","Use 'docker-credential-<name> list' to confirm the server URL the helper actually knows about"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"creds, err := source.Credentials(ctx, env)\nif err != nil {\n    if ociauthconfig.IsCredentialsNotFoundError(err) {\n        // helper has no credentials for this server: not a fault\n    } else if strings.Contains(err.Error(), \"credential helper\") {\n        // helper-level failure: check wrapped cause (missing binary vs auth failure)\n    }\n}","preventionTips":["Pre-install every docker-credential-* helper referenced by credsStore/credHelpers in CI images","Run 'docker-credential-<name> list' to confirm server URLs match what OpenTofu will query (https://<domain>)","Periodically re-run docker login to refresh helper-stored credentials"],"tags":["oci","credentials","docker","credential-helper","process"],"backgroundTag":null,"analyzedSha":"3561785c48c1ce615e7c50261bd351f26053efa2","analyzedAt":"2026-08-15T23:27:16.226Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}