-
Bug
-
Resolution: Won't Do
-
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.
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:
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.