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

Skaffold fails to find credentials for quay.io during check cache step #7048

Closed
mxpaspa opened this issue Jan 24, 2022 · 1 comment
Closed
Labels
area/registry help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/bug Something isn't working priority/p2 May take a couple of releases

Comments

@mxpaspa
Copy link

mxpaspa commented Jan 24, 2022

Expected behavior

Running skaffold-dev should run without errors

Actual behavior

Listing files to watch...
 - redhat-marketplace-operator
 - redhat-marketplace-reporter
 - redhat-marketplace-metric-state
 - redhat-marketplace-authcheck
 - redhat-marketplace-data-service
Generating tags...
 - redhat-marketplace-operator -> quay.io/<quayUsername>/redhat-marketplace-operator:tag
 - redhat-marketplace-reporter -> ""
 - redhat-marketplace-metric-state -> "" 
 - redhat-marketplace-authcheck -> ""
 - redhat-marketplace-data-service -> ""
Checking cache...
ERRO[0001] No matching credentials were found for "quay.io" 
ERRO[0001] No matching credentials were found for "quay.io" 
ERRO[0001] No matching credentials were found for "quay.io" 
 - redhat-marketplace-operator: Found Remotely
 - redhat-marketplace-reporter: Found Remotely
 - redhat-marketplace-metric-state: Found. Tagging
 - redhat-marketplace-authcheck: Found Remotely
 - redhat-marketplace-data-service: Found Remotely
Tags used in deployment:
 - redhat-marketplace-operator -> quay.io/<quayUsername>/redhat-marketplace-operator:tag@sha
 - redhat-marketplace-reporter -> 
 - redhat-marketplace-metric-state -> 
 - redhat-marketplace-authcheck -> 
 - redhat-marketplace-data-service -> 
Starting deploy...
Release "rhm-operator" has been upgraded. Happy Helming!
NAME: rhm-operator
LAST DEPLOYED: Mon Jan 24 09:01:35 2022
NAMESPACE: openshift-redhat-marketplace
STATUS: deployed
REVISION: 71
TEST SUITE: None
Waiting for deployments to stabilize...
Deployments stabilized in 228.338694ms
port forwarding statefulset-prometheus-rhm-marketplaceconfig-meterbase-openshift-redhat-marketplace-9090 got terminated: output: Error from server (NotFound): statefulsets.apps "prometheus-rhm-marketplaceconfig-meterbase" not found

port forwarding deployment-rhm-metric-state-openshift-redhat-marketplace-8080 got terminated: output: Error from server (NotFound): deployments.apps "rhm-metric-state" not found

Press Ctrl+C to exit
Watching for changes...

with --verbosity trace:

TRAC[0001] <-- 401 https://quay.io/v2/ (170.766023ms)   
TRAC[0001] <-- 401 https://quay.io/v2/ (170.714074ms)   
TRAC[0001] <-- 401 https://quay.io/v2/ (171.059423ms)   
TRAC[0001] HTTP/2.0 401 Unauthorized                    
TRAC[0001] Content-Length: 4                            
TRAC[0001] Content-Type: text/html; charset=utf-8       
TRAC[0001] Date: Mon, 24 Jan 2022 14:03:01 GMT          
TRAC[0001] Docker-Distribution-Api-Version: registry/2.0 
TRAC[0001] Server: nginx/1.12.1                         
TRAC[0001] Www-Authenticate: Bearer realm="https://quay.io/v2/auth",service="quay.io" 
TRAC[0001]                                              
TRAC[0001] true                                         
TRAC[0001] HTTP/2.0 401 Unauthorized                    
TRAC[0001] Content-Length: 4                            
TRAC[0001] Content-Type: text/html; charset=utf-8       
TRAC[0001] Date: Mon, 24 Jan 2022 14:03:01 GMT          
TRAC[0001] Docker-Distribution-Api-Version: registry/2.0 
TRAC[0001] Server: nginx/1.12.1                         
TRAC[0001] Www-Authenticate: Bearer realm="https://quay.io/v2/auth",service="quay.io" 
TRAC[0001]                                              
TRAC[0001] true                                         
TRAC[0001] --> GET https://quay.io/v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-metric-state%3Apull&service=quay.io [body redacted: basic token response contains credentials] 
TRAC[0001] HTTP/2.0 401 Unauthorized                    
TRAC[0001] Content-Length: 4                            
TRAC[0001] Content-Type: text/html; charset=utf-8       
TRAC[0001] Date: Mon, 24 Jan 2022 14:03:01 GMT          
TRAC[0001] Docker-Distribution-Api-Version: registry/2.0 
TRAC[0001] Server: nginx/1.12.1                         
TRAC[0001] Www-Authenticate: Bearer realm="https://quay.io/v2/auth",service="quay.io" 
TRAC[0001]                                              
TRAC[0001] true                                         
TRAC[0001] --> GET https://quay.io/v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-authcheck%3Apull&service=quay.io [body redacted: basic token response contains credentials] 
TRAC[0001] --> GET https://quay.io/v2/auth?scope=repository%A<quay username>%2Fredhat-marketplace-data-service%3Apull&service=quay.io [body redacted: basic token response contains credentials] 
TRAC[0001] <-- 401 https://quay.io/v2/ (171.261435ms)   
TRAC[0001] HTTP/2.0 401 Unauthorized                    
TRAC[0001] Content-Length: 4                            
TRAC[0001] Content-Type: text/html; charset=utf-8       
TRAC[0001] Date: Mon, 24 Jan 2022 14:03:01 GMT          
TRAC[0001] Docker-Distribution-Api-Version: registry/2.0 
TRAC[0001] Server: nginx/1.12.1                         
TRAC[0001] Www-Authenticate: Bearer realm="https://quay.io/v2/auth",service="quay.io" 
TRAC[0001]                                              
TRAC[0001] true                                         
TRAC[0001] <-- 401 https://quay.io/v2/ (171.384198ms)   
TRAC[0001] HTTP/2.0 401 Unauthorized                    
TRAC[0001] Content-Length: 4                            
TRAC[0001] Content-Type: text/html; charset=utf-8       
TRAC[0001] Date: Mon, 24 Jan 2022 14:03:01 GMT          
TRAC[0001] Docker-Distribution-Api-Version: registry/2.0 
TRAC[0001] Server: nginx/1.12.1                         
TRAC[0001] Www-Authenticate: Bearer realm="https://quay.io/v2/auth",service="quay.io" 
TRAC[0001]                                              
TRAC[0001] true                                         
TRAC[0001] GET /v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-authcheck%3Apull&service=quay.io HTTP/1.1 
TRAC[0001] Host: quay.io                                
TRAC[0001] User-Agent: go-containerregistry/v0.6.0      
TRAC[0001] Authorization: <redacted>                    
TRAC[0001] Accept-Encoding: gzip                        
TRAC[0001]                                              
TRAC[0001]                                              
TRAC[0001] --> GET https://quay.io/v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-reporter%3Apull&service=quay.io [body redacted: basic token response contains credentials] 
TRAC[0001] GET /v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-data-service%3Apull&service=quay.io HTTP/1.1 
TRAC[0001] Host: quay.io                                
TRAC[0001] User-Agent: go-containerregistry/v0.6.0      
TRAC[0001] Authorization: <redacted>                    
TRAC[0001] Accept-Encoding: gzip                        
TRAC[0001]                                              
TRAC[0001]                                              
TRAC[0001] GET /v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-metric-state%3Apull&service=quay.io HTTP/1.1 
TRAC[0001] Host: quay.io                                
TRAC[0001] User-Agent: go-containerregistry/v0.6.0      
TRAC[0001] Authorization: <redacted>                    
TRAC[0001] Accept-Encoding: gzip                        
TRAC[0001]                                              
TRAC[0001]                                              
TRAC[0001] --> GET https://quay.io/v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-operator%3Apull&service=quay.io [body redacted: basic token response contains credentials] 
TRAC[0001] GET /v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-reporter%3Apull&service=quay.io HTTP/1.1 
TRAC[0001] Host: quay.io                                
TRAC[0001] User-Agent: go-containerregistry/v0.6.0      
TRAC[0001] Authorization: <redacted>                    
TRAC[0001] Accept-Encoding: gzip                        
TRAC[0001]                                              
TRAC[0001]                                              
TRAC[0001] GET /v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-operator%3Apull&service=quay.io HTTP/1.1 
TRAC[0001] Host: quay.io                                
TRAC[0001] User-Agent: go-containerregistry/v0.6.0      
TRAC[0001] Authorization: <redacted>                    
TRAC[0001] Accept-Encoding: gzip                        
TRAC[0001]                                              
TRAC[0001]                                              
TRAC[0001] <-- 429 https://quay.io/v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-operator%3Apull&service=quay.io (24.749026ms) [body redacted: basic token response contains credentials] 
TRAC[0001] <-- 429 https://quay.io/v2/auth?scope=repository%3A<quay username>%2Fredhat-marketplace-reporter%3Apull&service=quay.io (24.845843ms) [body redacted: basic token response contains credentials] 
TRAC[0001] HTTP/2.0 429 Too Many Requests               
TRAC[0001] Content-Length: 185                          
TRAC[0001] Content-Type: text/html                      
TRAC[0001] Date: Mon, 24 Jan 2022 14:03:01 GMT          
TRAC[0001] Server: nginx/1.12.1                         
TRAC[0001]                                              
TRAC[0001]                                              
TRAC[0001] HTTP/2.0 429 Too Many Requests               
TRAC[0001] Content-Length: 185                          
ERRO[0001] No matching credentials were found for "quay.io" 

Information

  • Skaffold version: 1.35.0
  • Operating system: macOS monterey 12.1
  • Installed via: running binary inside a /bin folder of current project
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta10
kind: Config
metadata:
  name: redhat-marketplace-operator
build:
  local:
    useBuildkit: true
    concurrency: 2
  tagPolicy:
    customTemplate:
      template: '{{ .VERS }}-{{ .GC }}'
      components:
        - name: VERS
          envTemplate:
            template: '{{.VERSION}}'
        - name: GC
          gitCommit:
            variant: AbbrevCommitSha
  artifacts:
    - image: redhat-marketplace-operator
      context: .
      custom:
        buildCommand: ARCHS=amd64 make vet docker-build
        dependencies:
          paths:
            - go.mod
            - go.sum
            - 'main.go'
            - 'apis/**'
            - 'controllers/**'
            - 'pkg/**'
            - 'assets/**'
            - Dockerfile
          ignore:
            - './**/*_test.go'
    - image: redhat-marketplace-reporter
      context: ../reporter/v2
      custom:
        buildCommand: ARCHS=amd64 make vet docker-build
        dependencies:
          paths:
            - go.mod
            - go.sum
            - cmd/**
            - pkg/**
            - Dockerfile
          ignore:
            - './**/*_test.go'
    - image: redhat-marketplace-metric-state
      context: ../metering/v2
      custom:
        buildCommand: ARCHS=amd64 make vet docker-build
        dependencies:
          paths:
            - go.mod
            - go.sum
            - cmd/**
            - internal/**
            - pkg/**
            - './**/*.go'
            - Dockerfile
          ignore:
            - './**/*_test.go'
    - image: redhat-marketplace-authcheck
      context: ../authchecker/v2
      custom:
        buildCommand: ARCHS=amd64 make vet docker-build
        dependencies:
          paths:
            - go.mod
            - go.sum
            - cmd/**
            - pkg/**
            - Dockerfile
          ignore:
            - '**/*_test.go'
    - image: redhat-marketplace-data-service
      context: ../airgap/v2
      custom:
        buildCommand: ARCHS=amd64 make vet docker-build
        dependencies:
          paths:
            - go.mod
            - go.sum
            - apis/**
            - cmd/server/**
            - pkg/**
            - internal/**
            - Dockerfile
          ignore:
            - '**/*_test.go'
deploy:
  helm:
    releases:
      - name: rhm-operator
        namespace: openshift-redhat-marketplace
        artifactOverrides:
          operatorImage: redhat-marketplace-operator
          reporterImage: redhat-marketplace-reporter
          metricStateImage: redhat-marketplace-metric-state
          authCheckImage: redhat-marketplace-authcheck
          dqLiteImage: redhat-marketplace-data-service
        wait: false
        upgradeOnChange: true
        chartPath: ./config/helm-wrapper
        setValueTemplates:
          'devEnvVars[0].name': 'RELATED_IMAGE_METERDEF_FILE_SERVER'
          'devEnvVars[0].value': '{{.IMAGE_REGISTRY}}/rhm-meterdefinition-file-server:v1'
        valuesFiles:
          - ./config/helm-wrapper/values.yaml
          - ./config/helm-wrapper/devValues.yaml
    flags:
      install:
        - --post-renderer
        - config/helm-wrapper/kustomize
      upgrade:
        - --post-renderer
        - config/helm-wrapper/kustomize
portForward:
  - resourceType: StatefulSet
    resourceName: prometheus-rhm-marketplaceconfig-meterbase
    port: 9090
  - resourceType: Deployment
    resourceName: rhm-metric-state
    port: 8080

Steps to reproduce the behavior

  • This is occurring on an open source, redhat operator project built in golang.
  1. git clone https://github.com/redhat-marketplace/redhat-marketplace-operator
  2. need to be running docker buildx and create a buildx container docker buildx create --use --name build --node build --driver-opt network=host for example
  3. setup a quay.io account
  4. run docker login with docker login command provided by quay.io. Account Settings > User Setting > CLI password > Generate Encrypted Password
  5. export IMAGE_REGISTRY=quay.io/<quay username>
  6. from the project root run make docker-build
  7. This will build all the images and push to quay.io. Make all the repositories public in quay when after make docker-build completes.
  8. from project root run make skaffold-dev

docker/config.json

  1 {
  2     "auths": {
  3         "quay.io": {},
  4         "recovery.quay.io": {}
  5     },
  6     "credsStore": "desktop",
  7     "experimental": "enabled",
  8     "stackOrchestrator": "swarm",
  9     "currentContext": "default"
 10 }

~/.skaffold/config

  1 global:
 2   survey:
 3     last-prompted: "2022-01-24T08:38:00-05:00"
 4   collect-metrics: true
 5   update:
 6     last-prompted: "2022-01-24T09:47:30-05:00"
 7 kubeContexts: []
@tejal29 tejal29 added area/registry kind/bug Something isn't working priority/p2 May take a couple of releases help wanted We would love to have this done, but don't have the bandwidth, need help from contributors labels Jan 26, 2022
@mxpaspa
Copy link
Author

mxpaspa commented Jan 27, 2022

Turned out to be an issue with our build process. Closing.

@mxpaspa mxpaspa closed this as completed Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/bug Something isn't working priority/p2 May take a couple of releases
Projects
None yet
Development

No branches or pull requests

2 participants