{"record":{"id":"5fff9a836db903ea","repo":"GoogleContainerTools/jib","slug":"the-credential-helper-credentialhelper-returned-5fff9a","errorCode":null,"errorMessage":"The credential helper ${credentialHelper} returned no credentials for server URL ${serverUrl}; error output: ${errorOutput}","messagePattern":"The credential helper (.+?) returned no credentials for server URL (.+?); error output: (.+?)","errorType":"exception","errorClass":"CredentialHelperUnhandledServerUrlException","httpStatus":null,"severity":"error","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/registry/credentials/DockerCredentialHelper.java","lineNumber":177,"sourceCode":"\n      try (OutputStream processStdin = process.getOutputStream()) {\n        processStdin.write(serverUrl.getBytes(StandardCharsets.UTF_8));\n      }\n\n      try (InputStreamReader processStdoutReader =\n          new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8)) {\n        String output = CharStreams.toString(processStdoutReader);\n\n        // Throws an exception if the credential store does not have credentials for serverUrl.\n        if (output.contains(\"credentials not found in native keychain\")) {\n          throw new CredentialHelperUnhandledServerUrlException(\n              credentialHelper, serverUrl, output);\n        }\n        if (output.isEmpty()) {\n          try (InputStreamReader processStderrReader =\n              new InputStreamReader(process.getErrorStream(), StandardCharsets.UTF_8)) {\n            String errorOutput = CharStreams.toString(processStderrReader);\n            throw new CredentialHelperUnhandledServerUrlException(\n                credentialHelper, serverUrl, errorOutput);\n          }\n        }\n\n        try {\n          DockerCredentialsTemplate dockerCredentials =\n              JsonTemplateMapper.readJson(output, DockerCredentialsTemplate.class);\n          if (Strings.isNullOrEmpty(dockerCredentials.username)\n              || Strings.isNullOrEmpty(dockerCredentials.secret)) {\n            throw new CredentialHelperUnhandledServerUrlException(\n                credentialHelper, serverUrl, output);\n          }\n\n          return Credential.from(dockerCredentials.username, dockerCredentials.secret);\n\n        } catch (JsonProcessingException ex) {\n          throw new CredentialHelperUnhandledServerUrlException(\n              credentialHelper, serverUrl, output);","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/registry/credentials/DockerCredentialHelper.java#L159-L195","documentation":"Another CredentialHelperUnhandledServerUrlException path: the credential helper process exited successfully but wrote nothing to stdout and non-empty error output to stderr. Jib treats that as 'no credentials for this server URL' and includes the helper's stderr in the message.","triggerScenarios":"Helper binary prints diagnostics to stderr and exits 0 without JSON on stdout; helper fails softly (e.g. keychain locked) producing no stdout; serverUrl unknown to the helper so it emits nothing on stdout.","commonSituations":"macOS keychain access denied to docker-credential-osxkeychain; helper misconfigured for the registry; older helper versions that don't recognize the server URL.","solutions":["Run the helper manually ('echo <serverUrl> | docker-credential-<helper> get') to see its stderr and fix the underlying cause.","Re-run 'docker login <serverUrl>' to store valid credentials.","Update or reinstall the credential helper binary.","Supply credentials explicitly in the build configuration instead of via the helper."],"exampleFix":"// debug before fixing\necho gcr.io | docker-credential-gcr get\n// after (fixed helper/config), or:\njib { to { auth { username = 'user'; password = 'pass' } } }","handlingStrategy":"try-catch","validationCode":"// Probe helper stdout/stderr before use\nProcess p = new ProcessBuilder(\"docker-credential-<helper>\", \"get\").start();\np.getOutputStream().write((serverUrl + \"\\n\").getBytes()); p.getOutputStream().close();\nboolean ok = p.getInputStream().readAllBytes().length > 0;","typeGuard":null,"tryCatchPattern":"try { retrieve(); } catch (CredentialHelperUnhandledServerUrlException e) { logger.warn(\"Helper produced no stdout: {}\", e.getMessage()); }","preventionTips":["Update credential helper binaries regularly.","Fix keychain/keyring access permissions (macOS/Windows).","Test helpers manually with echo <server> | docker-credential-<x> get.","Avoid wrapper scripts that swallow stdout."],"tags":["docker","credentials","credential-helper"],"backgroundTag":"missing-credentials","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}