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

Fails to use supplied credentials when pushing to Docker Hub

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins 1.609.1
      Docker Build Step Plugin 1.28
      Docker commons Plugin 1.2 (also occurs with 1.1)
    • Similar Issues:

      Description

      I'm using an external docker REST endpoint. I can create, tag, remove, etc images.

      When I attempt to pull or push images from a private repository on Docker Hub, I get the following errors:

      [Docker] INFO: Pulling image oneplace/edu-api:latest
      [Docker] INFO:

      Unknown macro: {"status"}

      [Docker] INFO: {"errorDetail":

      Unknown macro: {"message"}

      ,"error":"Error: image oneplace/edu-api:latest not found"}
      [Docker] ERROR: command 'Pull image' failed: {"errorDetail":

      Unknown macro: {"message"}

      ,"error":"Error: image oneplace/edu-api:latest not found"}

      or

      {{[Docker] INFO: Sucessfully created image oneplace/edu-ui:latest
      [Docker] INFO: Pushing image oneplace/edu-ui
      [Docker] INFO:

      Unknown macro: {"status"}

      [Docker] INFO: {"status":"Buffering to Disk","progressDetail":{},"id":"0b16d5e541a6"}{"status":"Image push failed","progressDetail":{},"id":"0b16d5e541a6"}{"errorDetail":

      Unknown macro: {"message"}

      ,"error":"Error pushing to registry: Authentication is required."}
      [Docker] INFO: Done pushing image oneplace/edu-ui}}

      In either case, the cause seems to be failure to authenticate. The credentials for repository are provided when configuring Push Image, but they don't seem to be used.

        Attachments

          Activity

          Hide
          tallandtree Mariska Tallandtree added a comment - - edited

          I have the same issue with a private docker registry, Cloudbees Docker Custom Build Environment Plugin 1.64, Docker Commons Plugin 1.2 and pull from private registry. I've provided the credentials for pulling from the private registry, but the only way I get it working, is logging into the Jenkins master server (also a docker container) as user jenkins (the user which runs jenkins), and enter:

          $ docker login sys-registry1.ccveu.local 
          

          and provide my credentials. The provided credentials in the Jenkins gui does not seem to be used. (see also screenshot)

          Show
          tallandtree Mariska Tallandtree added a comment - - edited I have the same issue with a private docker registry, Cloudbees Docker Custom Build Environment Plugin 1.64, Docker Commons Plugin 1.2 and pull from private registry. I've provided the credentials for pulling from the private registry, but the only way I get it working, is logging into the Jenkins master server (also a docker container) as user jenkins (the user which runs jenkins), and enter: $ docker login sys-registry1.ccveu.local and provide my credentials. The provided credentials in the Jenkins gui does not seem to be used. (see also screenshot)

            People

            • Assignee:
              vjuranek vjuranek
              Reporter:
              woz5999 J Woz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: