hi,

i am setting up a CI pipeline that creates docker images, uploads them to 
my google docker registry/repository and then redeploys my webapp. 

Right now I work on the docker push step, which fails with this stack trace:

 ERROR: Build step failed with exception
com.google.jenkins.plugins.credentials.oauth.GoogleRobotPrivateKeyCredentials$AccountIdNotSetException
        at 
com.google.jenkins.plugins.credentials.oauth.GoogleRobotPrivateKeyCredentials.getGoogleCredential(GoogleRobotPrivateKeyCredentials.java:181)
        at 
com.google.jenkins.plugins.credentials.oauth.GoogleRobotPrivateKeyCredentials.getGoogleCredential(GoogleRobotPrivateKeyCredentials.java:45)
        at 
com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials.getAccessToken(GoogleRobotCredentials.java:100)
        at 
com.google.jenkins.plugins.googlecontainerregistryauth.GoogleContainerRegistryCredentialModule.getToken(GoogleContainerRegistryCredentialModule.java:73)
        at 
com.google.jenkins.plugins.googlecontainerregistryauth.GoogleContainerRegistryCredential.getPassword(GoogleContainerRegistryCredential.java:224)
        at 
com.google.jenkins.plugins.googlecontainerregistryauth.GoogleContainerRegistryTokenSource.convert(GoogleContainerRegistryTokenSource.java:48)
        at 
com.google.jenkins.plugins.googlecontainerregistryauth.GoogleContainerRegistryTokenSource.convert(GoogleContainerRegistryTokenSource.java:32)
        at 
jenkins.authentication.tokens.api.AuthenticationTokens.convert(AuthenticationTokens.java:148)
        at 
jenkins.authentication.tokens.api.AuthenticationTokens.convert(AuthenticationTokens.java:110)
        at 
org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.getToken(DockerRegistryEndpoint.java:179)
        at 
org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:201)
        at 
org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:193)
        at 
com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:381)
        at 
com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:359)
        at 
com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:305)
        at 
com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:252)
        at 
com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:233)
        at 
com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:208)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
        at hudson.model.Build$BuildExecution.build(Build.java:205)
        at hudson.model.Build$BuildExecution.doRun(Build.java:162)
        at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
        at hudson.model.Run.execute(Run.java:1741)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at 
hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:408)


This started happening after i deleted some unused and unrelated 
credentials from the global credentials. 

I am speculating that the credentials store got confused because the 
AccountID is encoded in the credentials, isnt it? if not, where can i 
supply it?

(Before I got this error: 

The push refers to a repository 
[eu.gcr.io/founderschair-website-01-981/website-image] (len: 1)
Sending image list
Error: Status 403 trying to push repository 
founderschair-website-01-981/website-image: "Access denied."

but i do hope I created the proper OAuth credentials by now. -- is there a 
tutorial for that part with both the google and the jenkins side explained? 
i followed 
 
https://groups.google.com/forum/#!searchin/jenkinsci-users/docker$20container/jenkinsci-users/3DiEV7qQ7CM/1wHn3XzKrD4J
 
- is that state-of-the-art?)

/andreas

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f4b98423-b874-4fec-ac98-b0d6c1b6be68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to