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

"Registry credentials" is not working with a private docker registry

    XMLWordPrintable

Details

    Attachments

      Issue Links

        Activity

          ryancurrah Ryan Currah added a comment - - edited

          We thought we could use it for our private registry turns out this is not the case. As Jenkins Enterprise customers we would love to be able to specify which registry the credentials are for.

          ryancurrah Ryan Currah added a comment - - edited We thought we could use it for our private registry turns out this is not the case. As Jenkins Enterprise customers we would love to be able to specify which registry the credentials are for.
          ryancurrah Ryan Currah added a comment - - edited

          Another issue is that users keep selecting this option with invalid credentials and it breaks builds. Because it writes a docker credentials file to /home/jenkins/.dockercfg with bad credentials. No one can pull from docker.io because we are getting auth errors against docker.io in all the jobs now. Everyone who uses that build slave cant pull images because of one person's misconfiguration ina job. Is there some less persistent way to insert the credentials on a per job basis?

          ryancurrah Ryan Currah added a comment - - edited Another issue is that users keep selecting this option with invalid credentials and it breaks builds. Because it writes a docker credentials file to /home/jenkins/.dockercfg with bad credentials. No one can pull from docker.io because we are getting auth errors against docker.io in all the jobs now. Everyone who uses that build slave cant pull images because of one person's misconfiguration ina job. Is there some less persistent way to insert the credentials on a per job basis?
          tenyo Tenyo Grozev added a comment -

          The registry authentication stopped working for us after we upgraded from Docker 1.10 to 1.12, which now uses exclusively .docker/config.json instead of .dockercfg. This plugin only generates .dockercfg. As a workaround, I've logged in locally on the Docker host to generate the config.json.

          tenyo Tenyo Grozev added a comment - The registry authentication stopped working for us after we upgraded from Docker 1.10 to 1.12, which now uses exclusively .docker/config.json instead of .dockercfg. This plugin only generates .dockercfg. As a workaround, I've logged in locally on the Docker host to generate the config.json.

          I went on for hours in circles just to fix this at the end by adding an execute shell step to do the following:

          mv ~/.dockercfg ~/.dockercfg.old

          This fixed my issue.

          Thanks ryancurrah for pointing out the exact issue with this file.

          rehabhassanein Rehab Hassanein added a comment - I went on for hours in circles just to fix this at the end by adding an execute shell step to do the following: mv ~/.dockercfg ~/.dockercfg.old This fixed my issue. Thanks ryancurrah for pointing out the exact issue with this file.
          bkmeneguello Bruno Meneguello added a comment - - edited

          I'm using this with Kubernetes cloud and a docker-dind image.
          I just succeeded by adding a shell step with docker login ... before the step.

          bkmeneguello Bruno Meneguello added a comment - - edited I'm using this with Kubernetes cloud and a docker-dind image. I just succeeded by adding a shell step with docker login ... before the step.

          People

            csanchez Carlos Sanchez
            nkcfan Chi
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: