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

Error pulling images, unauthorized #336

Closed
diit opened this issue Apr 4, 2018 · 11 comments
Closed

Error pulling images, unauthorized #336

diit opened this issue Apr 4, 2018 · 11 comments
Labels
area/build kind/bug Something isn't working priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.

Comments

@diit
Copy link

diit commented Apr 4, 2018

Issues without logs and details are more complicated to fix.
Please help us!

Expected behavior

  • Pulls image down and starts pods/etc.

Actual behavior

Failed to pull image "gcr.io/xx/yy:latest": rpc error: code = Unknown desc = Error response from daemon: 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

Information

I have run gcloud docker -a as well as can pull image locally with no issue.

Skaffold version: master
Operating system: Ubuntu 16.04
Content of skaffold.yaml:

apiVersion: skaffold/v1alpha2
kind: Config
build:
  artifacts:
  - imageName: gcr.io/xxx/yyy
    workspace: .
  local: {}
deploy:
  kubectl:
    manifests:
      - kubernetes/stage/* 

Steps to reproduce the behavior

  1. ...
  2. ...
@dcherniv
Copy link

dcherniv commented Apr 6, 2018

@diit Did you authenticate your docker to gcr?
https://cloud.google.com/container-registry/docs/pushing-and-pulling
Which skaffold version are you using?

@r2d4
Copy link
Contributor

r2d4 commented Apr 23, 2018

@diit any update here? Can you try running with -v debug?

@cch0
Copy link

cch0 commented Jun 7, 2018

Ran into the same issue today and found out that the issue is coming from kubectl deployment and due to the image you are using is not publicly accessible.

Follow the instruction here at Serving images publicly should resolve your issue as it did for me.

@dgageot dgageot added the kind/bug Something isn't working label Jun 10, 2018
@dgageot
Copy link
Contributor

dgageot commented Jun 25, 2018

Closing as this doesn't seem to be strictly related to Skaffold

@dgageot dgageot closed this as completed Jun 25, 2018
@BezVezeE
Copy link

Hey i have this issue aswell,

I have local kubernetes cluster and when i try to pull the image with docker pull gcr;//xx.xx.xx it works but when i try to create a deployment in kubernetes it gives the error,

besides gcloud auth configure-docker i also tried with configuring secrets with json file

this is my deployment configuration


apiVersion: apps/v1 
kind: Deployment
metadata:
  name: logstash
spec:
  selector:
    matchLabels:
      app: logstash
  replicas:
  template:
    metadata:
      labels:
        app: logstash
    spec:
      containers:
      - name: logstash
        image: us.gcr.io/xx/xx/xxx
        ports:
        - containerPort: 12201
      imagePullSecrets:
      - name: gcr-json-key 

has anybody have any idea

@haf
Copy link

haf commented Feb 28, 2019

yes, I think this is a skaffold issue since these images can be pulled with docker pull ... on the host

@markkohdev
Copy link

We're experiencing the same issue. Has anyone found a viable solution to this?

@steevee
Copy link

steevee commented May 13, 2019

I had the same issue, and upgrading from v0.26 (via snap) to the v0.29 as per release info did the trick.

@balopat balopat added priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence. and removed triage/more-info-needed labels Aug 16, 2019
@eswidler
Copy link

For anyone running into this issue on a Docker-optimized OS:

I also had this issue, and it was due to me messing around with permissions for the "Compute Engine default service account" on IAM. By default, the service account has "Editor" permissions, and you may see this error if you revoke whatever permission gave the service account access to pull from the registry.

@fabio-rigato
Copy link

Hi all,
I have the same issue.
Any news about that?
Regards
Fabio

@banshee
Copy link

banshee commented Nov 11, 2019

Don't know if this is related, but I saw the problem when I ran the commands under sudo - and didn't get the same error without the sudo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build kind/bug Something isn't working priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.
Projects
None yet
Development

No branches or pull requests