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

JGit+SSH fails with NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • git-client-plugin
    • None
    • Windows 8 64bit
      Jenkins 1.509.2
      Git plugin 1.4.0
      Git client plugin 1.1.2

      1. Enable JGit
        • Add "JGit" to "Manage Jenkins">"Configure System">"Git"
      2. Configure a project with Git+SSH using JGit
        • Check "Git" in "Source Code Management"
        • Put "ssh://..." in "Repository URL"
        • Click "Advanced" just above "Repository Browser" (Not the one just below "Repository URL")
        • Select "jgit" for "Git executable"
      3. Run "Build Now"
      4. Build fails with following output:
        Using strategy: Default
        Cloning the remote Git repository
        [WARNING] JGit doesn't support reference repository. This flag is ignored.
        FATAL: null
        java.lang.NullPointerException
        	at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:31)
        	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
        	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
        	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
        	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
        	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
        	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1105)
        	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
        	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
        	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
        	at org.jenkinsci.plugins.gitclient.JGitAPIImpl$3.execute(JGitAPIImpl.java:643)
        	at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:57)
        	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.clone(JGitAPIImpl.java:98)
        	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1006)
        	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
        	at hudson.FilePath.act(FilePath.java:904)
        	at hudson.FilePath.act(FilePath.java:877)
        	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
        	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1108)
        	at hudson.model.AbstractProject.checkout(AbstractProject.java:1367)
        	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:674)
        	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
        	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:579)
        	at hudson.model.Run.execute(Run.java:1575)
        	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        	at hudson.model.ResourceController.execute(ResourceController.java:88)
        	at hudson.model.Executor.run(Executor.java:237)
        

            ndeloof Nicolas De Loof
            ikedam ikedam
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: