GoogleContainerTools/jib · error · BuildStepsExecutionException

${helpfulSuggestions.forInsecureRegistry()}

Error message

${helpfulSuggestions.forInsecureRegistry()}

What it means

BuildStepsExecutionException wrapping a RegistryAuthenticationFailedException thrown in JibBuildRunner.runBuild() when Jib cannot authenticate against the target registry at all (token endpoint failure, unreachable auth server, malformed credentials), i.e. the request never got far enough to be a per-repository 401. The forInsecureRegistry()/none() suggestion path is used when the cause is not an HTTP ResponseException, indicating a connection- or configuration-level authentication failure.

Source

Thrown at jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/JibBuildRunner.java:276

    } catch (RegistryCredentialsNotSentException ex) {
      throw new BuildStepsExecutionException(helpfulSuggestions.forCredentialsNotSent(), ex);

    } catch (RegistryAuthenticationFailedException ex) {
      if (ex.getCause() instanceof ResponseException) {
        handleRegistryUnauthorizedException(
            new RegistryUnauthorizedException(
                ex.getServerUrl(), ex.getImageName(), (ResponseException) ex.getCause()),
            helpfulSuggestions);
      } else {
        // Unknown cause
        throw new BuildStepsExecutionException(helpfulSuggestions.none(), ex);
      }

    } catch (UnknownHostException ex) {
      throw new BuildStepsExecutionException(helpfulSuggestions.forUnknownHost(), ex);

    } catch (InsecureRegistryException ex) {
      throw new BuildStepsExecutionException(helpfulSuggestions.forInsecureRegistry(), ex);

    } catch (RegistryException ex) {
      String message = Verify.verifyNotNull(ex.getMessage()); // keep null-away happy
      throw new BuildStepsExecutionException(message, ex);

    } catch (ExecutionException ex) {
      String message = ex.getCause().getMessage();
      throw new BuildStepsExecutionException(
          message == null ? "(null exception message)" : message, ex.getCause());

    } catch (InterruptedException ex) {
      Thread.currentThread().interrupt();
      throw new BuildStepsExecutionException(helpfulSuggestions.none(), ex);
    }

    throw new IllegalStateException("unreachable");
  }

View on GitHub (pinned to fb949e2676)

Solutions

  1. Check network connectivity and any proxy settings between the build machine and the registry's auth endpoint
  2. Confirm registry URL/protocol is correct; if the registry only serves plain HTTP, configure Jib's allowInsecureRegistries option for that registry
  3. Verify supplied credentials are well-formed and that the registry's auth service is operational
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/JibBuildRunner.java:276 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/1ba2f99e88d59c3f. Report an issue: GitHub.