Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

dockerhub auth not working

Valentin Constantinescu June 16, 2022

hi guys,

Did you change anything on the integration with dockerhub?

I am executing a task using shared credentials which used to work and now is failing with this error.

 

com.atlassian.bamboo.task.TaskException: Failed to execute task
	at com.atlassian.bamboo.plugins.docker.service.PullService.execute(PullService.java:41)
	at com.atlassian.bamboo.plugins.docker.tasks.cli.DockerCliTask.execute(DockerCliTask.java:70)
	at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:323)
	at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:258)
	at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:323)
	at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:205)
	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:177)
	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:168)
	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118)
	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:161)
	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:122)
	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.atlassian.bamboo.docker.DockerException: Error running Docker pull command. See messages above for details. If no reason is specified it may be because you have not provided login details to a registry that requires authorisation.
	at com.atlassian.bamboo.plugins.docker.client.DockerCmd.pull(DockerCmd.java:189)
	at com.atlassian.bamboo.plugins.docker.service.PullService.execute(PullService.java:37)
	... 17 more
Caused by: com.atlassian.utils.process.ProcessException: Error executing  pull hashicorp/terraform:latest
	at com.atlassian.bamboo.plugins.docker.process.DockerTaskProcessService.execute(DockerTaskProcessService.java:64)
	at com.atlassian.bamboo.plugins.docker.client.DockerCmd.lambda$pull$1(DockerCmd.java:170)
	at com.atlassian.bamboo.plugins.docker.client.DockerCmd.pull(DockerCmd.java:177)
	... 18 more

 I am asking as I know that recently you changed the auth mechanism for Bitbucket, so maybe this is the case too. Someone can point me to the right documentation please? and I will be on my way.

Thanks 

1 comment

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 16, 2022

Hello @Valentin Constantinescu

No recent changes have been made to Bamboo and how it deals with Docker login.

Depending on how your Docker task is configured, it might expect the "docker login" to be managed by the operating system. You can alternatively add a username and password so Bamboo will make sure to run "docker login/logout" when necessary.

Perhaps your credentials have expired?

You can also enable DEBUG logs for the following classes to find exactly what Bamboo is doing:

  • com.atlassian.bamboo.docker
  • com.atlassian.bamboo.plugins.docker
  • com.atlassian.utils.process

Sincerely,

Eduardo Alvarenga
Atlassian Support APAC 

Valentin Constantinescu June 20, 2022

It uses the shared credentials, but it does not work neither with native or direct username/password. Command line similar command works just fine.

Valentin Constantinescu June 21, 2022

Fixed it. Seems that docker capabilities can be agent specific and the path was not set up properly. I have to thank the chance - Bamboo error logs are pretty verbose and useless in the same time.

Like # people like this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events