Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Pushing with authentication doesn't work with credsStore osxkeychain #328

Closed
fakeh opened this issue Apr 28, 2017 · 3 comments
Closed

Pushing with authentication doesn't work with credsStore osxkeychain #328

fakeh opened this issue Apr 28, 2017 · 3 comments

Comments

@fakeh
Copy link

fakeh commented Apr 28, 2017

Trying to push a Maven built image to Docker Hub with the authentication details specified in ~/.docker/config.json (as created by docker login) doesn't pull in the correct credentials, resulting in:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:push (push-image) on project publisher: Exception caught: denied: requested access to the resource is denied -> [Help 1]

Setting up the element in ~/.m2/settings.xml works as expected.

<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<execution>
	<id>push-image</id>
	<phase>deploy</phase>
	<goals>
		<goal>push</goal>
	</goals>
	<configuration>
		<imageName>redbite/${image.name}:${project.version}</imageName>
		<useConfigFile>true</useConfigFile>
	</configuration>
</execution>
$cat ~/.docker/config.json
{
	"auths": {
		"https://index.docker.io/v1/": {}
	},
	"credsStore": "osxkeychain"
}

Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T20:39:06+01:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.4", arch: "x86_64", family: "mac"

@mattnworb
Copy link
Member

see spotify/docker-client#657, support needs to be added to the underlying docker-client library

@mattnworb mattnworb changed the title Pushing to Docker Hub with useConfigFile doesn't work on macOS Pushing to Docker Hub with useConfigFile doesn't work with credsStore osxkeychain Jun 7, 2017
@mattnworb mattnworb changed the title Pushing to Docker Hub with useConfigFile doesn't work with credsStore osxkeychain Pushing with authentication doesn't work with credsStore osxkeychain Jun 7, 2017
@vijay-js
Copy link

Any workaround or tag in maven to force the plugin to use creds mentioned in of pom.xml

@davidxia
Copy link
Contributor

closed by #381

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants