Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow credentialhelper look up the registry without scheme prefix (#1068) #1094

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

* **0.27-SNAPSHOT**
- Fix NPE when no volume configuration is present (#1091)

- Allow credentialhelper look up the registry without scheme prefix (#1068)

* **0.27.0** (2018-09-26)
- Jump to Java 8 as minimal Java version
- Fix NPE in docker:remove-volumes when no volume configuration is given ([#1086](https://github.com/fabric8io/docker-maven-plugin/issues/1086))
Expand Down Expand Up @@ -34,7 +35,7 @@

* **0.25.2** (2018-04-14)
- Fix for docker login issue with index.docker.io using a credential helper ([#946](https://github.com/fabric8io/docker-maven-plugin/issues/946))

* **0.25.1** (2018-04-12)
- Fix regression which broke labels and env with space ([#988](https://github.com/fabric8io/docker-maven-plugin/issues/988))
- Fix and enhanced zero-config Dockerfile mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public String getVersion() throws MojoExecutionException {
public AuthConfig getAuthConfig(String registryToLookup) throws MojoExecutionException {
try {
final GetCommand getCommand = new GetCommand();
return toAuthConfig(getCommand.getCredentialNode(EnvUtil.ensureRegistryHttpUrl(registryToLookup)));
JsonObject creds = getCommand.getCredentialNode(registryToLookup);
if (creds == null) {
creds = getCommand.getCredentialNode(EnvUtil.ensureRegistryHttpUrl(registryToLookup));
}
return toAuthConfig(creds);
} catch (IOException e) {
throw new MojoExecutionException("Error getting the credentials for " + registryToLookup + " from the configured credential helper",e);
}
Expand Down