Error while pushing image to dockerhub repo

1,013 views
Skip to first unread message

Jitendra

unread,
Mar 22, 2018, 12:54:45 PM3/22/18
to skaffold-users
Hello,
 
I am trying to run 'getting-started' example in the skafold repo. I am running this on macbook and using docker for mac version "17.12.0-ce-mac55". I have setup my docker client to push images to dockerhub using 'docker login' and able to use 'docker push' command to push images to dockerhub repo.
 
when I run 'skaffold dev'  on getting-started example I am getting following error in RUN step while pushing image to dockerhub repo. Is 'docker login' command is right way to setup docker client? if not how to setup docker client in order to work it for skaffold?


Step 5/5 : RUN go build -o app main.go
 ---> Using cache
 ---> ab24efd0568c
Successfully built ab24efd0568c
Successfully tagged 8b48e594c206f8ff47d112c5cb79a39b:latest
Successfully tagged jpatil/skaffold-example:ab24efd0568c982bda0cfd44d66bb8bd4bcfee998d4fd5e3cb65a7853f82749d
INFO[0000] Image jpatil/skaffold-example:ab24efd0568c982bda0cfd44d66bb8bd4bcfee998d4fd5e3cb65a7853f82749d not canonical, skipping registry auth helpers. This will fail when pushing to any private registry.
WARN[0000] run: build step: running push: pushing image to repository: Error response from daemon: Bad parameters and missing X-Registry-Auth: EOF
DEBU[0000] Checking base image golang:1.9.4-alpine3.7 for ONBUILD triggers.
DEBU[0000] Using registries.d directory /etc/containers/registries.d for sigstore configuration
DEBU[0000]  No signature storage configuration found for docker.io/library/golang:1.9.4-alpine3.7
DEBU[0000] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
DEBU[0000] Ping https://registry-1.docker.io/v2/ err <nil>
DEBU[0000] Ping https://registry-1.docker.io/v2/ status 401
DEBU[0002] Downloading /v2/library/golang/blobs/sha256:fb6e10bf973b841879e08f77bbc2d2cc4972828c6d5139bdb2c5da93bf8c8937
DEBU[0002] Found onbuild triggers [] in image golang:1.9.4-alpine3.7
INFO[0002] Found dependencies for dockerfile [main.go]
INFO[0002] Added watch for /Users/jpatil/dev/gh/skaffold/examples/getting-started/Dockerfile
INFO[0002] Added watch for /Users/jpatil/dev/gh/skaffold/examples/getting-started/main.go


-Jitendra

Matt Rickard

unread,
Mar 22, 2018, 1:50:27 PM3/22/18
to skaffold-users
Hi! Thanks for opening up the issue. I think this is a bug on our end. Can you try renaming your image in the skaffold.yaml to `docker.io/jpatil/skaffold-example`? That might help hint skaffold towards using the dockerhub auth.

I've opened up an issue to handle the case where docker.io isn't present but the image is part of a private DockerHub repository, since this is something we should support.

Thanks for trying out skaffold!

-Matt

Jitendra

unread,
Mar 22, 2018, 1:56:57 PM3/22/18
to skaffold-users
Thanks Matt, I tried that but getting different error this time.

Step 5/5 : RUN go build -o app main.go
 ---> Using cache
 ---> ab24efd0568c
Successfully built ab24efd0568c
Successfully tagged 1eb7791d7d2b838daf22529578168344:latest
The push refers to repository [docker.io/jpatil/skaffold-example]
651beccd35ee: Preparing
ceff7d49a553: Preparing
672bbb8bee5c: Preparing
74a1d9766bfa: Preparing
1101b710f69a: Preparing
bddb1cc398ae: Preparing
f5b78c9c4415: Preparing
ed1f21c46579: Preparing
cd7100a72410: Preparing
f5b78c9c4415: Waiting
ed1f21c46579: Waiting
bddb1cc398ae: Waiting
cd7100a72410: Waiting
WARN[0003] run: build step: running push: denied: requested access to the resource is denied
DEBU[0003] Checking base image golang:1.9.4-alpine3.7 for ONBUILD triggers.
DEBU[0003] Using registries.d directory /etc/containers/registries.d for sigstore configuration
DEBU[0003]  No signature storage configuration found for docker.io/library/golang:1.9.4-alpine3.7
DEBU[0003] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
DEBU[0003] Ping https://registry-1.docker.io/v2/ err <nil>
DEBU[0003] Ping https://registry-1.docker.io/v2/ status 401
DEBU[0004] Downloading /v2/library/golang/blobs/sha256:fb6e10bf973b841879e08f77bbc2d2cc4972828c6d5139bdb2c5da93bf8c8937
DEBU[0005] Found onbuild triggers [] in image golang:1.9.4-alpine3.7
INFO[0005] Found dependencies for dockerfile [main.go]
INFO[0005] Added watch for /Users/jpatil/dev/gh/skaffold/examples/getting-started/Dockerfile
INFO[0005] Added watch for /Users/jpatil/dev/gh/skaffold/examples/getting-started/main.go

dina.m....@intel.com

unread,
Mar 22, 2018, 1:58:51 PM3/22/18
to skaffold-users
I'm having the same issue as Jitendra, and even with the `docker.io` prefix in the skaffold.yaml, it's not working.  I am able to push the image manually from the docker command line, but running from skaffold is giving this error:

WARN[0004] run: build step: running push: errors:

denied: requested access to the resource is denied

unauthorized: authentication required


Thanks,
Dina


On Thursday, March 22, 2018 at 10:50:27 AM UTC-7, Matt Rickard wrote:

Matt Rickard

unread,
Mar 23, 2018, 12:43:19 PM3/23/18
to skaffold-users
Hi all,

David Gageot has graciously fixed this issue https://github.com/GoogleCloudPlatform/skaffold/pull/276 and it will be in the next release (v0.3.0) of skaffold. Thanks for bringing this to our attention.

-Matt

Raj Boruah

unread,
Jun 10, 2018, 12:56:23 PM6/10/18
to skaffold-users
Hi Matt,

I tried with skaffold v0.7.0, but I am getting the same old issue while trying skaffold/examples/getting-started:

FATA[0004] first build: exiting dev mode because the first build failed: running push: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

Please note that I am successfully logged into docker hub account (using docker login & was able to push other images).

Regards,
Rajen.

Deepak Gupta

unread,
Jan 30, 2020, 7:46:09 AM1/30/20
to skaffold-users

All,

I am using skaffold build to build and push an image to artifactory container repo, although it seems to go through, it puts the image under a *-dirty folder instead of "latest".  Does anyone know under which circumstances does this occur?  I am using kaniko as a plugin with skaffold.  See output below:

$ skaffold build
←[34mGenerating tags...←[0m
←[34mChecking cache...←[0m
←[34m - containerregistry-na.jpmchase.net/container-sandbox/amo/test-gkpgos-example: ←[0m←[33mNot found. Building←[0m
...


Many thanks in advance,

-Deepak
Reply all
Reply to author
Forward
0 new messages