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

Jenkins Git Plugin fails when job name contains “plink”

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • Jenkins v2.222.1
      Git plugin v4.2.2
      Git client plugin v3.2.1
    • issue in CLI git 1.7 and 1.8, not in the git plugin

      See https://stackoverflow.com/questions/44891718/jenkins-git-plugin-fails-when-job-name-contains-plink

      We are observing the same problem on our server. Any job containing the word "plink" fails to clone. Since we are using a multi-branch pipeline, this causes any branch with the word "plink" to mysteriously fail.

       The logs show this strange error message.

      stderr: getaddrinfo: atch: Name or service not known

      Then it tries to use the port from the URL as if were a hostname.

      ssh: connect to host 7999 port 22: Success

      I don't know how that connection could have succeeded. Then we get another error.

      fatal: Could not read from remote repository.

       See attached logs.

          [JENKINS-62534] Jenkins Git Plugin fails when job name contains “plink”

          Mark Waite added a comment - - edited

          I can duplicate the problem you're reporting but only if I use a version of command line git that was released over 6 years ago. Command line git 1.8 as included by default on CentOS 7, Red Hat Enterprise Linux 7, Oracle Linux 7, and Scientific Linux 7 fails on my multibranch test case when the branch name contains the word 'plink'. Command line git 1.7 (unsupported with the git plugin, but known to work in some cases) as included by default on CentOS 6, Red Hat Enterprise Linux 6, and others also fails on my multibranch test case when the branch name contains the word 'plink'.

          You can review the test job definition and how it is used in my Docker image for testing.

          Alternatives to resolve the issue:

          • Enable JGit in Jenkins and use JGit instead of command line git
          • Install a recent version of command line git (significant improvements have been made in the 30+ releases of command line git since 1.8 was released in 2013)
          • Access the git repository with http or https rather than ssh protocol

          Command line git versions 2.7 and newer are known to not have the issue. Command line git versions 2.0 and newer are likely to not have the issue.

          Mark Waite added a comment - - edited I can duplicate the problem you're reporting but only if I use a version of command line git that was released over 6 years ago. Command line git 1.8 as included by default on CentOS 7, Red Hat Enterprise Linux 7, Oracle Linux 7, and Scientific Linux 7 fails on my multibranch test case when the branch name contains the word 'plink'. Command line git 1.7 (unsupported with the git plugin, but known to work in some cases) as included by default on CentOS 6, Red Hat Enterprise Linux 6, and others also fails on my multibranch test case when the branch name contains the word 'plink'. You can review the test job definition and how it is used in my Docker image for testing. Alternatives to resolve the issue: Enable JGit in Jenkins and use JGit instead of command line git Install a recent version of command line git (significant improvements have been made in the 30+ releases of command line git since 1.8 was released in 2013) Access the git repository with http or https rather than ssh protocol Command line git versions 2.7 and newer are known to not have the issue. Command line git versions 2.0 and newer are likely to not have the issue.

          Jesse Rittner added a comment -

          markewaite Thank you very much for looking into this! As per your findings, we checked the version of git being used on the master agent, and indeed it was using 1.8. I have also filed JENKINS-62587 to hopefully make troubleshooting such incompatibilities easier in the future.

          Jesse Rittner added a comment - markewaite Thank you very much for looking into this! As per your findings, we checked the version of git being used on the master agent, and indeed it was using 1.8. I have also filed JENKINS-62587 to hopefully make troubleshooting such incompatibilities easier in the future.

            markewaite Mark Waite
            rittneje Jesse Rittner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: