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.