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

Docker publish plugin throws error "Please login prior to push" after publishing the image

    Details

    • Similar Issues:

      Description

      [abc-docker-image-test] $ docker build -t admin/abc:3.2.4-1137 abc/xyz/3.2.4
      Sending build context to Docker daemon 9.728 kB

      Sending build context to Docker daemon
      Step 0 : FROM ubuntu:precise
      ---> 1f80e9ca2ac3
      ...
      ....
      Successfully built 0bfa936c91ea

      [abc-docker-image-test] $ docker tag --force=true 0bfa936c91ea admin/abc:latest

      [abc-docker-image-test] $ docker push admin/abc:3.2.4-1137
      The push refers to a repository [admin/abc] (len: 1)
      Sending image list

      Please login prior to push:
      Username: EOF

      Build step 'Docker build and publish' marked build as failure

        Attachments

          Activity

          Hide
          recena Manuel Recena Soto added a comment -

          I'm getting the same error. My environment is:

          • CloudBees Docker Build and Publish plugin v1.0
          • Jenkins 1.609.1
          • Mac OSX
          Show
          recena Manuel Recena Soto added a comment - I'm getting the same error. My environment is: CloudBees Docker Build and Publish plugin v1.0 Jenkins 1.609.1 Mac OSX
          Hide
          csanchez Carlos Sanchez added a comment -

          I don't see anywhere that https://registry-1.docker.io/v2/ is the default registry for 1.6. When I do Docker login without registry it creates a https://index.docker.io/v1/ in ~/.dockercfg in both 1.6.0 and 1.6.2 (OSX homebrew).

          Are you explicitly setting https://registry-1.docker.io/v2/ in the registry field in Jenkins?

          So seems that for docker https://registry-1.docker.io/v2/ is like a private registry and you should prepend it to the image name as in docker push registry-1.docker.io/mydocker/repo

          Show
          csanchez Carlos Sanchez added a comment - I don't see anywhere that https://registry-1.docker.io/v2/ is the default registry for 1.6. When I do Docker login without registry it creates a https://index.docker.io/v1/ in ~/.dockercfg in both 1.6.0 and 1.6.2 (OSX homebrew). Are you explicitly setting https://registry-1.docker.io/v2/ in the registry field in Jenkins? So seems that for docker https://registry-1.docker.io/v2/ is like a private registry and you should prepend it to the image name as in docker push registry-1.docker.io/mydocker/repo
          Hide
          csanchez Carlos Sanchez added a comment -

          And seems that you get the "Please login prior to push" when you try to push an image that you don't have permissions to push in the hub

          Show
          csanchez Carlos Sanchez added a comment - And seems that you get the "Please login prior to push" when you try to push an image that you don't have permissions to push in the hub
          Hide
          recena Manuel Recena Soto added a comment -

          Hi Carlos Sanchez, thanks so much for your help. IMO we can close this issue because the problem was related to permissions on DockerHub.

          Show
          recena Manuel Recena Soto added a comment - Hi Carlos Sanchez , thanks so much for your help. IMO we can close this issue because the problem was related to permissions on DockerHub.
          Hide
          recena Manuel Recena Soto added a comment -

          This bug is solved on *docker-build-publish-1.0*.

          Show
          recena Manuel Recena Soto added a comment - This bug is solved on * docker-build-publish-1.0 *.

            People

            • Assignee:
              recena Manuel Recena Soto
              Reporter:
              maneeshmp Maneesh M P
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: