5

I'm trying to pull an image like this in my project repository and I keep getting this error.

I don't have problems with authentification and docker login works fine.

$ docker pull gcr.io/[PROJECT-ID]/[IMAGE]:[TAG]

Error response from daemon: pull access denied for gcr.io/[PROJECT-ID]/[IMAGE]:[TAG], repository does not exist or may require 'docker login': denied: Permission denied for "0.2.0" from request "/v2/[PROJECT-ID]/[IMAGE]/manifests/[TAG]".

Any ideas?

metk
  • 69
  • 1
  • 10
  • By any chance are you using a private cluster? If so, there are some limitations about [pulling images](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#docker_hub) from public Docker hub. Another similar kind of [thread](https://stackoverflow.com/questions/60847252/kubernetes-cant-pull-images-from-docker-hub-repository) which will be helpful. – Alexandre Jun 06 '20 at 04:01
  • @Alexandre Can you please be more specific about what commands should I execute? – metk Jun 09 '20 at 13:12
  • Are you using both private clusters and trying to pull images from a public Docker hub? If yes, then it should be [the document](https://cloud.google.com/container-registry/docs/using-dockerhub-mirroring) where you will find those commands. You can also look at [this document](https://docs.docker.com/docker-hub/) for further assistance. – Alexandre Jun 12 '20 at 02:35
  • Which Docker version are you using? Does this error show up on every pull or just on gcr.io? – Serhii Rohoza Jan 22 '21 at 09:13

1 Answers1

4

You can configure your docker credential with your own credential by executing this command

gcloud auth configure-docker
guillaume blaquiere
  • 66,369
  • 2
  • 47
  • 76
  • 4
    It shows this: `WARNING: Your config file at [...] contains these credential helper entries: { "credHelpers": { "us.gcr.io": "gcloud", "staging-k8s.gcr.io": "gcloud", "asia.gcr.io": "gcloud", "gcr.io": "gcloud", ... } } Adding credentials for all GCR repositories. WARNING: A long list of credential helpers may cause delays running 'docker build'. We recommend passing the registry name to configure only the registry you are using. gcloud credential helpers already registered correctly.` But I still have the same error while pulling – metk Jun 05 '20 at 10:43