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

`java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Git client plugin 3.3.0 released June 19, 2020

      If the trilead-api plugin is not installed on a Jenkins 2.190.1 server, results in the following stacktrace

      java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey
              at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)
              at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1336)
              at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1083)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      Caused: java.lang.NoClassDefFoundError: org/kohsuke/putty/PuTTYKey
              at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:174)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1878)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1793)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:78)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:545)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:758)
              at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
              at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
              at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
              at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
              at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
              at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor 

      Workaround is to install the trilead-api plugin. The plugin was unbundled from Jenkins core in Jenkins 2.190.1 and is needed by those plugins (git client, ssh-slaves, etc.) that previously used the version that was bundled with Jenkins core.

            markewaite Mark Waite
            dicomj23 Dicom J
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: