{"record":{"id":"4a110288d587b50b","repo":"GoogleContainerTools/jib","slug":"the-credential-helper-credentialhelper-was-not","errorCode":null,"errorMessage":"The credential helper ${credentialHelper} was not found (No such file or directory)","messagePattern":"The credential helper (.+?) was not found \\(No such file or directory\\)","errorType":"exception","errorClass":"CredentialHelperNotFoundException","httpStatus":null,"severity":"error","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/registry/credentials/DockerCredentialHelper.java","lineNumber":208,"sourceCode":"\n          return Credential.from(dockerCredentials.username, dockerCredentials.secret);\n\n        } catch (JsonProcessingException ex) {\n          throw new CredentialHelperUnhandledServerUrlException(\n              credentialHelper, serverUrl, output);\n        }\n      }\n\n    } catch (IOException ex) {\n      if (ex.getMessage() == null) {\n        throw ex;\n      }\n\n      // Checks if the failure is due to a nonexistent credential helper CLI.\n      if (ex.getMessage().contains(\"No such file or directory\")\n          || ex.getMessage().contains(\"cannot find the file\")\n          || ex.getMessage().contains(\"error=2\")) /* errno=2 (ENOENT) */ {\n        throw new CredentialHelperNotFoundException(credentialHelper, ex);\n      }\n\n      throw ex;\n    }\n  }\n\n  Path getCredentialHelper() {\n    return credentialHelper;\n  }\n}\n","sourceCodeStart":190,"sourceCodeEnd":219,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/registry/credentials/DockerCredentialHelper.java#L190-L219","documentation":"CredentialHelperNotFoundException is thrown when the configured credential helper executable does not exist: the underlying process launch failed with 'No such file or directory', 'cannot find the file', or errno=2. Jib detects this specific failure mode and reports that the helper binary itself is missing.","triggerScenarios":"docker-credential-<suffix> binary is not on PATH; configured helper name in credHelpers/credsStore does not correspond to any installed binary; PATH differs in CI container.","commonSituations":"Using docker-credential-gcr on a machine where it was never installed; referencing osxkeychain helper on Linux; slim CI images lacking docker-credential-helpers; PATH not including ~/bin or /usr/local/bin in CI.","solutions":["Install the required helper (e.g. docker-credential-gcr, docker-credential-ecr-login) and ensure it is on PATH.","Remove the helper entry from ~/.docker/config.json (credsStore/credHelpers) if you don't need it.","Provide credentials directly in the build configuration instead of relying on the helper.","Verify PATH in the build environment (CI images often differ from your shell)."],"exampleFix":"// before\n{ \"credHelpers\": { \"gcr.io\": \"gcr\" } } // binary not installed\n// after\nbrew install docker-credential-gcr  # or remove the credHelpers entry\ndocker-credential-gcr configure-docker","handlingStrategy":"validation","validationCode":"// Check helper exists on PATH before build\nboolean found = java.util.stream.Stream.of(System.getenv(\"PATH\").split(java.io.File.pathSeparator))\n    .map(dir -> Path.of(dir, \"docker-credential-gcr\")).anyMatch(java.nio.file.Files::exists);","typeGuard":null,"tryCatchPattern":"try { retrieve(); } catch (CredentialHelperNotFoundException e) { logger.error(\"Helper {} not found: install it or remove from config\", e.getCredentialHelper()); }","preventionTips":["Install required credential helpers in all build environments/CI images.","Keep helper binaries on PATH (check PATH in CI vs local shell).","Remove unused credsStore/credHelpers entries from ~/.docker/config.json.","Prefer explicit auth config where helpers are unavailable."],"tags":["docker","credential-helper","command-not-found"],"backgroundTag":"command-not-found","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"}