Skip to content

Commit 79f7529

Browse files
committed
Align credential helper logic with Docker CLI
See gh-45269
1 parent 54086bb commit 79f7529

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ private Credential computeCredentialsFromHelper(String serverUrl) {
133133
}
134134

135135
private CredentialHelper getCredentialHelper(String serverUrl) {
136-
String name = this.dockerConfig.getCredHelpers().get(serverUrl);
137-
name = (StringUtils.hasText(name)) ? name : this.dockerConfig.getCredsStore();
136+
String name = this.dockerConfig.getCredHelpers().getOrDefault(serverUrl, this.dockerConfig.getCredsStore());
138137
return (name != null) ? this.credentialHelperFactory.apply(name.trim()) : null;
139138
}
140139

0 commit comments

Comments
 (0)