{"record":{"id":"14b49001c9008f87","repo":"GoogleContainerTools/jib","slug":"specified-credential-helper-was-not-found-crede","errorCode":null,"errorMessage":"Specified credential helper was not found: ${credentialHelper}","messagePattern":"Specified credential helper was not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/DefaultCredentialRetrievers.java","lineNumber":170,"sourceCode":"   *\n   * @return the list of {@link CredentialRetriever}s\n   * @throws FileNotFoundException if a credential helper path is specified, but the file doesn't\n   *     exist\n   */\n  public List<CredentialRetriever> asList() throws FileNotFoundException {\n    List<CredentialRetriever> credentialRetrievers = new ArrayList<>();\n    if (knownCredentialRetriever != null) {\n      credentialRetrievers.add(knownCredentialRetriever);\n    }\n    if (credentialHelper != null) {\n      // If credential helper contains file separator, treat as path; otherwise treat as suffix\n      if (credentialHelper.contains(FileSystems.getDefault().getSeparator())) {\n        if (!Files.exists(Paths.get(credentialHelper))) {\n          String osName = systemProperties.getProperty(\"os.name\").toLowerCase(Locale.ENGLISH);\n          if (!osName.contains(\"windows\")\n              || (!Files.exists(Paths.get(credentialHelper + \".cmd\"))\n                  && !Files.exists(Paths.get(credentialHelper + \".exe\")))) {\n            throw new FileNotFoundException(\n                \"Specified credential helper was not found: \" + credentialHelper);\n          }\n        }\n        credentialRetrievers.add(\n            credentialRetrieverFactory.dockerCredentialHelper(credentialHelper));\n      } else {\n        String suffix = credentialHelper; // not path; treat as suffix\n        credentialRetrievers.add(\n            credentialRetrieverFactory.dockerCredentialHelper(\"docker-credential-\" + suffix));\n      }\n    }\n\n    if (inferredCredentialRetriever != null) {\n      credentialRetrievers.add(inferredCredentialRetriever);\n    }\n\n    Set<Path> dockerConfigFiles = new LinkedHashSet<>();\n","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/DefaultCredentialRetrievers.java#L152-L188","documentation":"DefaultCredentialRetrievers.asList validates a configured credential helper path when the helper contains a path separator (i.e. an explicit path). If the file does not exist on disk (allowing Windows `.cmd`/`.exe` variants), a FileNotFoundException is thrown naming the helper. This ensures Jib fails fast instead of spawning a nonexistent helper at auth time.","triggerScenarios":"Configuring a path-style credential helper, e.g. `jib.to.auth.dockerCredentialHelper=/opt/bin/docker-credential-ecr-login`, where the file is not present (or on Windows, neither `helper.cmd` nor `helper.exe` exists).","commonSituations":"Docker credential helper not installed (docker-credential-gcr/ecr-login); helper installed under a name/path that differs from config; missing `.exe` extension on Windows; typo in the path.","solutions":["Install the credential helper (e.g. `docker-credential-gcr`, `docker-credential-ecr-login`) or correct the configured path.","Ensure the file is executable and on the expected absolute path.","On Windows, verify `helper.cmd` or `helper.exe` exists next to the configured path.","Alternatively drop the helper config and use `from.auth`/`to.auth` username/password, or a Docker config from a `docker login`."],"exampleFix":"// before\njib.to.credHelper = \"/opt/bin/docker-credential-ecr-login\"  // file missing\n// after\njib.to.credHelper = \"ecr-login\"  // on PATH, no separator -> no file check\n// or install it: docker-credential-ecr-login at the configured path","handlingStrategy":"validation","validationCode":"// check helper exists before invoking Jib\nimport java.nio.file.*;\nif (helper.contains(FileSystems.getDefault().getSeparator()) && !Files.exists(Paths.get(helper))) {\n  throw new IllegalStateException(\"credential helper missing: \" + helper);\n}","typeGuard":null,"tryCatchPattern":"try { jibBuild() } catch (BuildStepsExecutionException e)\n       /* cause: java.io.FileNotFoundException: Specified credential helper was not found */ {\n  // install the helper or switch to a name on PATH / explicit auth\n}","preventionTips":["Install docker-credential-* helpers before configuring them","Prefer bare helper names (on PATH) over explicit paths","On Windows account for .cmd/.exe extensions","Add a CI step verifying helper executables exist"],"tags":["authentication","credentials","file-not-found","docker"],"backgroundTag":"file-not-found","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}