-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.375.1
Git client plugin 4.0.0
Git plugin 5.0.0
Blue ocean plugins 1.26.0
-
-
1.27.0
The "End-to-End Multibranch Pipeline Project Creation" tutorial fails when trying to connect to the sample repository because a JGit class in JGit 6.4.0 (as provided by git client plugin 4.0.0) is in a different location than it was in JGit 5.13.1 (as provided by git client plugin 3.13.1).
Actual result
Pipeline creation stops when I click the "Create Pipeline" button on the page after entering the path to my local sample repository. The page prompts to create a credential, reports that the creation of the credential failed, then when the "Create Pipeline" button is pressed, it never returns.
It looks like this in the tutorial:
The stack trace recorded in the console log looks like this:
2023-01-04 19:29:54.501+0000 [id=17] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://testing-a.markwaite.net:8080/blue/rest/organizations/jenkins/pipelines/ java.lang.ClassNotFoundException: org.eclipse.jgit.transport.JschConfigSessionFactory at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476) at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) Caused: java.lang.NoClassDefFoundError: org/eclipse/jgit/transport/JschConfigSessionFactory at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Expected result
The tutorial should create a Pipeline in the repository and continue.
Issue
The JGit API changed from 5.13.1 to 6.0. Part of that API change included the move of the class from org.eclipse.jgit.transport.JschConfigSessionFactory to org.eclipse.jgit.transport.ssh.jsch.JschConfigSessionFactory
There are 4 references to that JGit class in the jenkinsci organization. Blue ocean is the only reference that as a relevant installation count. Other references can be seen through a GitHub query and include:
- Warrior plugin that was last released 5 years ago and is installed on 7 controllers
- OpenShift deployer plugin that was last released 8 years ago, is deprecated, has 4 open vulnerabilities, and is installed on 254 controllers
- Backend recipe submission repository that is archived and read-only
- links to