When using the docker-workflow plugin with the latest version of podman you cannot login. Podman no longer accepts a URL as the login argument.

      Old podman :
      sh-4.4$ podman version 3.2.3
      sh-4.4$ podman login -u maxa -p $PASSWORD https://registry-1.docker.io
      Login Succeeded!
      sh-4.4$ podman login -u maxa -p $PASSWORD registry-1.docker.io
      Login Succeeded!

      New podman :
      sh-4.4$ podman --version
      podman version 3.3.1
      sh-4.4$ podman login -u maxa -p $PASSWORD https://registry-1.docker.io
      Error: credentials key has https[s]:// prefix
      sh-4.4$ podman login -u maxa -p $PASSWORD registry-1.docker.io
      Login Succeeded!

      If you try to use a servername only in Jenkins, the plugin is expecting a full URL and you get an error :
      docker.withRegistry("registry-1.docker.io", docker_registry_credential)

      {...}

      hudson.remoting.ProxyException: java.net.MalformedURLException: no protocol: registry-1.docker.io
      at java.base/java.net.URL.<init>(URL.java:645)
      at java.base/java.net.URL.<init>(URL.java:541)
      at java.base/java.net.URL.<init>(URL.java:488)
      at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.getEffectiveUrl(DockerRegistryEndpoint.java:144)
      at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:299)
      at org.jenkinsci.plugins.docker.workflow.RegistryEndpointStep$Execution2.newKeyMaterialFactory(RegistryEndpointStep.java:95)
      at org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:52)
      at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)

      If you run the same command with https:// on the servername, podman throws the "Error: credentials key has https[s]:// prefix" message.

      You might want to fix this now before docker decide to follow the same rules on docker login and require only a servername not a full URL. (they might not, but can you imagine the panic if they do?)
      The fix should probably allow with/without protocol, otherwise is a breaking change.

          [JENKINS-67418] Cannot login to podman

          Ryan Acosta added a comment -

          I ran into the same issue today.  Glad to see it is already so well documented here.  I looked into the docker-commons plugin code because that's where the exception is thrown but I don't see a fix simple enough for me to implement myself.

          Ryan Acosta added a comment - I ran into the same issue today.  Glad to see it is already so well documented here.  I looked into the docker-commons plugin code because that's where the exception is thrown but I don't see a fix simple enough for me to implement myself.

          Mati vonSki added a comment -

          I have it too.

          In Jenkins:
          $ docker login -u ****** -p ******** https://storage.name.comEmulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
          Error: credentials key has https[s]:// prefix
          I use RHEL8.5 and podman . . . and now:

          $ ... downgrade podman-3.2.3

          it's work but it's not good idea.

          Mati vonSki added a comment - I have it too. In Jenkins: $ docker login -u ****** -p ******** https://storage.name.com Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. Error: credentials key has https [s] :// prefix I use RHEL8.5 and podman . . . and now: $ ... downgrade podman-3.2.3 it's work but it's not good idea.

          I provided a fix for this issue as pull request https://github.com/jenkinsci/docker-commons-plugin/pull/94 but till now no response. I verified it on my installation of jenkins using the new environment variable approach - defined in Global properties. That resolved the issue with latest podman. Hopefully it can be reviewed and merged for next release as it is indeed blocker for everyone using podman.

          Maciej Swiderski added a comment - I provided a fix for this issue as pull request https://github.com/jenkinsci/docker-commons-plugin/pull/94  but till now no response. I verified it on my installation of jenkins using the new environment variable approach - defined in Global properties. That resolved the issue with latest podman. Hopefully it can be reviewed and merged for next release as it is indeed blocker for everyone using podman.

            Unassigned Unassigned
            max_lan max allan
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: