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

Git CLI null pointer authentication exception when JGit authenticates successfully

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • Windows and Linux git plugin 2.0, git client plugin 1.4.5

      My multi-configuration job which uses JGit and a configured ssh credential from a DSA key file (.ssh/id_dsa) is able to successfully clone from my Debian Wheezy Linux server.

      The same credential fails to clone and reports a null pointer exception if I switch from the JGit implementation to the command line implementation.

      The stack trace is:

      Started by user anonymous
      Building remotely on alan-pc in workspace C:\J\workspace\git-jgit-ssh-multi
      Fetching changes from the remote Git repository
      Fetching upstream changes from ssh://wheezy64b/var/cache/git/mwaite/bin.git
      FATAL: null
      java.lang.NullPointerException
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:894)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:175)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)

      The multi-configuration job uses an ssh protocol URL like:

      ssh://wheezy64b/var/cache/git/mwaite/bin.git

      That URL works well for the JGit implementation, but not for command line git.

            ndeloof Nicolas De Loof
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: