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

Push is denied in automated build hooks #1611

Closed
vladgh opened this issue Aug 23, 2018 · 6 comments
Closed

Push is denied in automated build hooks #1611

vladgh opened this issue Aug 23, 2018 · 6 comments

Comments

@vladgh
Copy link

vladgh commented Aug 23, 2018

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 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?

@cowsrule
Copy link

Hi @vladgh , this issue should have been fixed ~8hrs ago. Are you continuing to see problems if you retry?

@vladgh
Copy link
Author

vladgh commented Aug 23, 2018

Last time I tried was about 8 hours ago 😬 before going to bed. I can confirm it works now. Thanks for the very fast response.

@vladgh vladgh closed this as completed Aug 23, 2018
@BWibo
Copy link

BWibo commented Aug 23, 2018

I am still facing a similar problem. I use TravisCI to build Docker images and push them to public docker hub repo. This can be observed in the Travis build log below. Each build job compiles one docker image tag and pushes it.
https://travis-ci.org/BWibo/3dcitydb-web-map-docker/builds/419878622
For instance in job #20.1 I get following error (line 553+):

$ ./travis.sh deploy
bwibo/3dcitydb-web-map:devel-v1.1.0
Login Succeeded
The push refers to a repository [docker.io/bwibo/3dcitydb-web-map]
ced0eff746c5: Preparing
e0380a13ea30: Preparing
3f6b10f86861: Preparing
b362a7b48c80: Preparing
24b90fac9d7a: Preparing
0c16ddb03cf9: Preparing
1d346e46d556: Preparing
d8a71178df17: Preparing
e492023cc4f9: Preparing
cbda574aa37a: Preparing
8451f9fe0016: Preparing
858cd8541f7e: Preparing
a42d312a03bb: Preparing
dd1eb1fd7e08: Preparing
0c16ddb03cf9: Waiting
1d346e46d556: Waiting
d8a71178df17: Waiting
e492023cc4f9: Waiting
cbda574aa37a: Waiting
8451f9fe0016: Waiting
858cd8541f7e: Waiting
a42d312a03bb: Waiting
dd1eb1fd7e08: Waiting
denied: requested access to the resource is denied

The same happens with the other images in the other build jobs.
I just tried building the image locally on my computer and I get the same error when trying to push to DockerHub.

Any suggestions?
Thx in advance.

@cowsrule
Copy link

If you are not using the Hub autobuilds this is a different issue. It does appear that you are not properly logged into your account if you are unable to push from your local machine. I would retry your docker login.

@BWibo
Copy link

BWibo commented Aug 24, 2018

Thx, this is what I just tried:

  1. Change password on https://hub.docker.com/ and logout/login on the web page afterwards to see if ithe new pwd works
  2. Logout from docker on my local machine using docker logout
  3. Login again using docker login
  4. Try to push image: docker push bwibo/3dcitydb-web-map:devel-alpine-v9.9.9 which results in denied: requested access to the resource is denied

Second, I delete the repo I am trying to push to manually from the DockerHub webpage.
Afterwards, something really strage happens. I build two different images: bwibo/3dcitydb-web-map:devel-alpine-v9.9.9, bwibo/3dcitydb-web-map:anotherTag
Pushing the first image seems to succeed:

$ docker push bwibo/3dcitydb-web-map:devel-alpine-v9.9.9
The push refers to repository [docker.io/bwibo/3dcitydb-web-map]
7e1922e5c0c9: Preparing
dfed7c8b5f21: Preparing
b33229d32236: Preparing
6e7c43924624: Preparing
48b46ba2d823: Preparing
f92cffbbeced: Preparing
287ef32bfa90: Preparing
ce291010afac: Preparing
73046094a9b8: Preparing
f92cffbbeced: Waiting
287ef32bfa90: Waiting
ce291010afac: Waiting
73046094a9b8: Waiting
48b46ba2d823: Pushed
b33229d32236: Pushed
6e7c43924624: Pushed
dfed7c8b5f21: Pushed
287ef32bfa90: Pushed
73046094a9b8: Pushed
ce291010afac: Pushed
7e1922e5c0c9: Pushed
f92cffbbeced: Pushed
devel-alpine-v9.9.9: digest: sha256:5e37f8c3e84087e3cfb97cda56485c577817ce092eba67db98da4e4bef568c47 size: 2211

However, pushing the second image within the same shell session (without logout/login inbetween) fails:

$ docker push bwibo/3dcitydb-web-map:anotherTag
The push refers to repository [docker.io/bwibo/3dcitydb-web-map]
e90cfff03a7f: Preparing
6eee3ee9c840: Preparing
f6a7ab34d62a: Preparing
c2a36d90d9bd: Preparing
47d4a2607178: Preparing
d9e8709bb7c4: Preparing
1d346e46d556: Preparing
d8a71178df17: Preparing
e492023cc4f9: Preparing
cbda574aa37a: Preparing
8451f9fe0016: Preparing
858cd8541f7e: Preparing
a42d312a03bb: Preparing
dd1eb1fd7e08: Preparing
d9e8709bb7c4: Waiting
1d346e46d556: Waiting
d8a71178df17: Waiting
e492023cc4f9: Waiting
cbda574aa37a: Waiting
8451f9fe0016: Waiting
858cd8541f7e: Waiting
a42d312a03bb: Waiting
dd1eb1fd7e08: Waiting
denied: requested access to the resource is denied

I am running Docker on Windows 10 locally:

$ docker version
Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:05:28 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:13:46 2018
  OS/Arch:          linux/amd64
  Experimental:     true

@BWibo
Copy link

BWibo commented Aug 24, 2018

Sorry for the bother, I just resolved the issue myself.
With pushing the new repo I exceeded the free private repo limit, which caused me failing to push. After setting the repo to public manully on the DockerHub web page pushing works as expected again.

It would be helpful to add a more informative error message when the push fails because reaching the limit of private repos.

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

No branches or pull requests

3 participants