Docker Community Forums

Share and learn in the Docker community.

Push is denied in automated build hooks


(Vlad) #1

I am currently using hooks in an automated build to pass parameters to the docker build command, and tag the resulting images. The feature is documented here: https://docs.docker.com/docker-cloud/builds/advanced/

However, all my builds are now failing at the post_push step, where the docker push "${DOCKER_REPO}:${version}" command now fails with:

The push refers to repository [docker.io/vladgh/testautobuildhooks]
73046094a9b8: Preparing
73046094a9b8: Layer already exists
errors:
denied: requested access to the resource is denied
unauthorized: authentication required

Did anything change in the past few days with the way Docker Hub runs the build process?


(Acterry) #2

We’re having the exact same problem on our automated builds. We tag our branches with a datestamp. At first we thought the problem was in the date command. But,for testing, I simplified it to the following and we still get the same error across multiple repos.

#!/bin/bash
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH-TESTPOSTPUSHTAG
docker push $DOCKER_REPO:$SOURCE_BRANCH-TESTPOSTPUSHTAG

Error Message:

denied: requested access to the resource is denied
post_push hook failed! (1)

(Vlad) #3

I opened this issue https://github.com/docker/hub-feedback/issues/1611 on GitHub


(Vlad) #4

The issue was fixed a few hours ago.


(Acterry) #5

Ours was still failing as of 2 hours ago … trying again now.


(Mmatoscom) #6

Hi there, maybe you guys need to docker login first