{"record":{"id":"6e01d42bbf4951ea","repo":"GoogleContainerTools/jib","slug":"inferredauthexception-message","errorCode":null,"errorMessage":"InferredAuthException: ${message}","messagePattern":"InferredAuthException: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java","lineNumber":1015,"sourceCode":"            passwordPropertyName,\n            rawAuthConfiguration,\n            rawConfiguration);\n    if (optionalCredential.isPresent()) {\n      defaultCredentialRetrievers.setKnownCredential(\n          optionalCredential.get(), rawAuthConfiguration.getAuthDescriptor());\n    } else {\n      try {\n        Optional<AuthProperty> optionalInferredAuth =\n            inferredAuthProvider.inferAuth(imageReference.getRegistry());\n        if (optionalInferredAuth.isPresent()) {\n          AuthProperty auth = optionalInferredAuth.get();\n          String username = Verify.verifyNotNull(auth.getUsername());\n          String password = Verify.verifyNotNull(auth.getPassword());\n          Credential credential = Credential.from(username, password);\n          defaultCredentialRetrievers.setInferredCredential(credential, auth.getAuthDescriptor());\n        }\n      } catch (InferredAuthException ex) {\n        projectProperties.log(LogEvent.warn(\"InferredAuthException: \" + ex.getMessage()));\n      }\n    }\n\n    defaultCredentialRetrievers.setCredentialHelper(\n        credHelperConfiguration.getHelperName().orElse(null));\n    defaultCredentialRetrievers.asList().forEach(registryImage::addCredentialRetriever);\n  }\n\n  private static ImageReference getGeneratedTargetDockerTag(\n      RawConfiguration rawConfiguration,\n      ProjectProperties projectProperties,\n      HelpfulSuggestions helpfulSuggestions)\n      throws InvalidImageReferenceException {\n    return ConfigurationPropertyValidator.getGeneratedTargetDockerTag(\n        rawConfiguration.getToImage().orElse(null), projectProperties, helpfulSuggestions);\n  }\n\n  /**","sourceCodeStart":997,"sourceCodeEnd":1033,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java#L997-L1033","documentation":"This is not a thrown exception but a logged warning: while configuring credential retrievers, Jib attempted to use inferred authentication (e.g. from a plugin/provider like the Docker config or extension-supplied auth) and the InferredAuthException raised during that lookup was caught, logged at WARN level, and the build continues without the inferred credential.","triggerScenarios":"PluginConfigurationProcessor.configureCredentialRetrievers calls code that may throw InferredAuthException while extracting username/password from inferred auth (e.g. helpers like 'gcloud' credential extension data); on exception it logs \"InferredAuthException: <message>\" and proceeds with the remaining credential retrievers.","commonSituations":"Stale or incomplete docker/config.json auth entries (e.g. auths with missing username/password); expired cloud-provider credentials; malformed auth blocks produced by `docker login` variants.","solutions":["Read the wrapped message in the warning and fix the underlying auth source (e.g. re-run docker login or cloud provider login)","Verify username/password are present in the auth entry being inferred","Configure an explicit credential helper or username/password in the Jib configuration instead of relying on inferred auth","Ignore if another credential retriever (helper, explicit creds) succeeds"],"exampleFix":"// before\n<gcp.projectId>...</gcp.projectId>  // relying on stale inferred gcloud auth\n// after\n<configuration>\n  <from><image>...</image></from>\n  <to><image>...</image></to>\n</configuration>\n# and refresh credentials:\ngcloud auth login && gcloud auth configure-docker","handlingStrategy":"try-catch","validationCode":"// Check that inferred auth entries contain both username and password\nObject auth = dockerConfigJson.getAuth();\nif (auth == null || auth.getUsername() == null || auth.getPassword() == null) {\n  logger.warn(\"Inferred auth incomplete; configure a credential helper explicitly\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  configureInferredAuth();\n} catch (InferredAuthException e) {\n  logger.warn(\"Skipping inferred auth: \" + e.getMessage());\n}","preventionTips":["Keep docker login credentials fresh for the registries you build against","Configure an explicit credential helper (e.g. credHelper: gcr) rather than relying on inference","Inspect auths in ~/.docker/config.json for missing username/password fields"],"tags":["jib","auth","credentials"],"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"}