withDockerRegistry fails to login with complex password

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Jenkinsfile:

          stage('Deliver') {
            steps {
              withDockerRegistry([credentialsId: 'docker-creds', url: '']) {
                sh "docker push imagename"
              }
            }
          }
      

      Error:

      $ docker login -u username -p ******** https://index.docker.io/v1/
      WARNING! Using --password via the CLI is insecure. Use --password-stdin.
      Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
      

      Workaround:

      Change Docker Hub password from something complex (e.g. "]GT~XMRZwWc6]dUg:NMs") to something very simple (e.g. "insecurepass"). Using a simple password that is very long (e.g. "verylongpasswordhere") works fine too.

      `docker login` using complex password from the CLI works just fine.

            Assignee:
            Unassigned
            Reporter:
            Giovanni Tirloni
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: