Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55231

Declarative Docker executors cannot pull from private docker repo

XMLWordPrintable

      I'm trying to use my executor in a declarative pipeline like this:

      agent {
        docker {
          image 'myartifacts-docker.jfrog.io/golang:1.11.2'
          args '--tmpfs /.cache'
          label 'universal'
          registryCredentialsId 'DECLARATIVE_JENKINS_PIPELINE_REGISTRY_CREDENTIALS_ID_FOR_ARTIFACTORY'
        }
      }

      I cannot get it to work.

      I know the credential referenced there (a username/password credential) is able to do a docker login on the command line.

      What am I doing wrong?

      I also tried setting

      registryUrl 'https://myartifacts-docker.jfrog.io' 

      but that didn't help either.

      I'm just getting errors like:

      Error response from daemon: Get https://myartifacts-docker.jfrog.io/v2/golang/manifests/1.11.2: unknown: Authentication is required

            Unassigned Unassigned
            piratejohnny Jon B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: