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

Public key authentication with username fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None

      Description

      Attempting a public key authentication with username build
      Failed to authenticate: svn: File 'NULL' is not valid OpenSSH DSA or RSA private key file
      org.tmatesoft.svn.core.SVNAuthenticationException: svn: Authentication failed for /* removed */ 
      	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:47)
      	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:41)
      	at hudson.scm.UserProvidedCredential$AuthenticationManagerImpl.getNextAuthentication(UserProvidedCredential.java:223)
      	at org.tmatesoft.svn.core.internal.io.svn.SVNSSHConnector.open(SVNSSHConnector.java:104)
      	at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:74)
      	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1242)
      	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.testConnection(SVNRepositoryImpl.java:95)
      	at hudson.scm.SubversionSCM$DescriptorImpl.postCredential(SubversionSCM.java:1792)
      	at hudson.scm.SubversionSCM$DescriptorImpl.doPostCredential(SubversionSCM.java:1737)
      	at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:102)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      	at org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:242)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      	at org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:242)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:478)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:160)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      	at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:51)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      	at java.lang.Thread.run(Thread.java:662
      

        Issue Links

          Activity

          Hide
          myusuf3 Mahdi Yusuf added a comment -

          This occurred when updating from version 1.395 to 1.401.

          The subversion plugin in bundled with jenkin returns null when given a private key when authenticating with svn+ssh protocol

          Show
          myusuf3 Mahdi Yusuf added a comment - This occurred when updating from version 1.395 to 1.401. The subversion plugin in bundled with jenkin returns null when given a private key when authenticating with svn+ssh protocol
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Note to myself, I have no idea where that 'NULL' comes from (as opposed to 'null'.) Add more logging to verify what's submitted, and add more logging to SVNKit to record the progress of the private key loading process.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Note to myself, I have no idea where that 'NULL' comes from (as opposed to 'null'.) Add more logging to verify what's submitted, and add more logging to SVNKit to record the progress of the private key loading process.
          Hide
          benyee Ben Yee added a comment -

          Running into this issue as well, any updates on a solution/bug fix?

          Show
          benyee Ben Yee added a comment - Running into this issue as well, any updates on a solution/bug fix?
          Hide
          evernat evernat added a comment -

          A post [1] has the same error after using F-Secure Authentication Agent to generate a pair of keys.

          Then it says: "[Jenkins] is using OpenSSH private key format. Is there any other tools that i can use to convert my existing private key to OpenSSH format?

          Yes, PuTTYgen.exe comes with a function to convert putty private key to OpenSSH private key format. Great news, i import my existing Putty generated private key and click on the export to OpenSSH format. (SSH-2 RSA / 1024)

          After exported to OpenSSH format, the private key is working like a charm! The Hudson is supporting svn+ssh access now."

          [1] http://www.mkyong.com/hudson/how-to-make-hudson-support-svnssh-access/

          Show
          evernat evernat added a comment - A post [1] has the same error after using F-Secure Authentication Agent to generate a pair of keys. Then it says: " [Jenkins] is using OpenSSH private key format. Is there any other tools that i can use to convert my existing private key to OpenSSH format? Yes, PuTTYgen.exe comes with a function to convert putty private key to OpenSSH private key format. Great news, i import my existing Putty generated private key and click on the export to OpenSSH format. (SSH-2 RSA / 1024) After exported to OpenSSH format, the private key is working like a charm! The Hudson is supporting svn+ssh access now." [1] http://www.mkyong.com/hudson/how-to-make-hudson-support-svnssh-access/
          Hide
          elhabib_med Mohamed El Habib added a comment -

          I get the same error and fixed it by changing the end of line to the Unix format.

          Show
          elhabib_med Mohamed El Habib added a comment - I get the same error and fixed it by changing the end of line to the Unix format.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Seems the issue is fixed, please confirm

          Show
          oleg_nenashev Oleg Nenashev added a comment - Seems the issue is fixed, please confirm

            People

            • Assignee:
              Unassigned
              Reporter:
              kohsuke Kohsuke Kawaguchi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: