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

Inconsistent Docker Authorization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • docker
    • None
    • Jenkins 2.121.2

      Ubuntu 16.04

      org.jenkins-ci.plugins:docker-commons:1.8

       org.jenkins-ci.plugins:docker-workflow:1.13

      On a single cluster the "docker.withRegistry" demonstrates two different behaviors.

      It will sometimes write out authentication to .dockercfg it will alternatively perform a docker login.

       

      In both case the Jenkinsfiles start out as

       

      node("basic") {
      try {
                      
                  withCredentials([[$class          : 'UsernamePasswordMultiBinding',
                                    credentialsId   : 'ci_ldap',
                                    usernameVariable: 'LDAP_USER',
                                    passwordVariable: 'LDAP_PASSWORD']]) {
               docker.withRegistry("https://thing.jfrog.io/", 'ci_ldap') {
      

      The output is then either

       

      Wrote authentication to /home/jenkins/.dockercfg
      
      // 
      
      $ docker login -u **** -p ******** https://thing.jfrog.io/
      WARNING! Using --password via the CLI is insecure. Use --password-stdin.
      
      
      

       

      Seems related to -https://issues.jenkins-ci.org/browse/JENKINS-41051

            Unassigned Unassigned
            bnr_barrett Barrett Strausser
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: