-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
CentOS 8
Jenkins 2.321
GitHub Enterprise Server: 3.2.1
Slaves are using Swarm.
Plugins:
- Git: 4.10.0
- Git Client : 3.10.0
- GitHub Branch Source: 2.11.3
- GitHub: 1.34.1
My Jenkins instance is using GitHub App Authentication against a private GitHub Enterprise server. I am restricted to using https (service accounts are prohibited, so no SSH or PACs).
Issue
Multibranch Pipelines are not honoring Git Tool selection, so I can't use jgit. (I have slaves where system git isn't working correctly).
Repositories Requiring Authentication
- Freestyle or Matrix Job: Git tool selection works. I can pick jgit, and jgit is used to clone.
- Pipeline Job: tool selection is ineffective (uses git), example Jenkinsfile:
node('xxxx') { checkout([$class: 'GitSCM', branches: [[name: '*/main']], extensions: [], gitTool: 'jgit', userRemoteConfigs: [[credentialsId: 'ghes-app-MYORG', url: 'https://github.MYCOMPANY.com/MYORG/repo.git']]]) // uses git }
- Multibranch Pipeline (GitHub Org Folder): tool selection is ineffective:
node("xxxx") { println scm.gitTool //outputs: jgit checkout scm //uses: git }
Output from Pipeline Job runs:
The recommended git tool is: git
Repositories Without Authentication (public repos)
Same behavior but different printout (still does not use jgit)
Example Jenkinsfile:
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], gitTool: 'jgit', userRemoteConfigs: [[url: 'https://github.com/any/any.git']]]) // uses git
Output:
The recommended git tool is: NONE
NOTE: I do not have node-specific git tools configured anywhere in my installation.
Job Configs
(Multibranch pipeline config.xml attached)