GoogleContainerTools/jib · warning
%s is missing from build configuration; ignoring auth sectio
Error message
%s is missing from build configuration; ignoring auth section.
What it means
ConfigurationPropertyValidator.getImageCredential logs this warning when the build configuration's auth section has a password but no username (the message reports the missing username via auth.getUsernameDescriptor()). The incomplete auth entry is ignored and Jib falls back to other credential sources.
Source
Thrown at jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/ConfigurationPropertyValidator.java:85
String missingProperty =
"%s system property is set, but %s is not; attempting other authentication methods.";
if (!commandlinePassword.isEmpty()) {
logger.accept(
LogEvent.warn(String.format(missingProperty, passwordProperty, usernameProperty)));
}
if (!commandlineUsername.isEmpty()) {
logger.accept(
LogEvent.warn(String.format(missingProperty, usernameProperty, passwordProperty)));
}
// Check auth configuration next; warn if they aren't both set
if (!Strings.isNullOrEmpty(auth.getUsername()) && !Strings.isNullOrEmpty(auth.getPassword())) {
return Optional.of(Credential.from(auth.getUsername(), auth.getPassword()));
}
String missingConfig = "%s is missing from build configuration; ignoring auth section.";
if (!Strings.isNullOrEmpty(auth.getPassword())) {
logger.accept(LogEvent.warn(String.format(missingConfig, auth.getUsernameDescriptor())));
}
if (!Strings.isNullOrEmpty(auth.getUsername())) {
logger.accept(LogEvent.warn(String.format(missingConfig, auth.getPasswordDescriptor())));
}
return Optional.empty();
}
/**
* Returns an {@link ImageReference} parsed from the configured target image, or one of the form
* {@code project-name:project-version} if target image is not configured.
*
* @param targetImage the configured target image reference
* @param projectProperties the {@link ProjectProperties} providing the project name, version, and
* log event handler
* @param helpfulSuggestions used for generating the message notifying the user of the generated
* tag
* @return an {@link ImageReference} parsed from the configured target image, or one of the formView on GitHub (pinned to fb949e2676)
Solutions
- Add the missing username to the auth block in the build configuration
- Check that any variable used for the username resolves to a non-empty value in the build environment
- Remove the auth block entirely if you intend to use system properties or a credential helper
- Validate the full credential pair before the build (fail fast with a pre-build check)
Example fix
// before: build.gradle
jib { to { auth { password = 'secret' } } }
// after
jib { to { auth { username = 'user'; password = 'secret' } } } Defensive patterns
Strategy: validation
Validate before calling
// gradle pre-flight: auth must be a complete pair
afterEvaluate {
def auth = jib.to.auth
if ((auth.password && !auth.username) || (auth.username && !auth.password))
throw new GradleException("jib.to.auth requires both username and password")
} Try / catch
def credential = null if (auth?.username && auth?.password) credential = Credential.from(auth.username, auth.password) // otherwise skip auth entirely instead of a partial config
Prevention
- Keep auth username/password together in one config block
- Avoid interpolated variables in auth fields that may resolve to empty strings
- Centralize registry credentials in one reviewed location
When it happens
Trigger: build.gradle/pom.xml contains to.auth.password (non-empty) while to.auth.username is null/empty; the check at line 85 fires inside getImageCredential before returning Optional.empty().
Common situations: Editing build files and forgetting one auth field; templated configs where a variable (e.g. ${REGISTRY_USER}) resolves to empty; migrating configs and dropping one line.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- container.appRoot is not an absolute Unix-style path: ${inva
- invalid value for containerizingMode: ${invalidContainerizin
- container.workingDirectory is not an absolute Unix-style pat
- from.platforms contains a platform configuration that is mis
- container.volumes is not an absolute Unix-style path: ${inva
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/e4f966aa77d8de74.
Report an issue: GitHub.