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

ERROR: CVS Authentication failed: null. But selected ssh as protocol

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • cvs-plugin
    • None
    • Windows7

      Repository url configured in project
      CVSROOT=:ssh:preejith@172.16.0.2:22/repository
      CVS root given in configure system (CVS section): :ssh:@172.16.0.2:22/repository
      CVS server is Redhat Linux.

      Building in workspace C:\Program Files (x86)\Jenkins\workspace\new test
      Using globally configured password for connection to ':ext:172.16.0.2:22/repository' with username 'preejith'
      cvs checkout -P -r outreach-ep-motherdairy-phase2-dev -d outreachEnterprise-proj-MD outreachEnterprise-proj
      ERROR: CVS Authentication failed: null
      org.netbeans.lib.cvsclient.connection.AuthenticationException: SSH connection failed.
      at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:141)
      at org.netbeans.lib.cvsclient.Client$1.run(Client.java:374)
      at java.lang.Thread.run(Unknown Source)
      Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\ssh\id_rsa (The system cannot find the path specified)
      at com.jcraft.jsch.KeyPair.load(KeyPair.java:524)
      at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
      at com.jcraft.jsch.JSch.addIdentity(JSch.java:389)
      at com.jcraft.jsch.JSch.addIdentity(JSch.java:370)
      at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:135)
      ... 2 more
      Caused by: java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\ssh\id_rsa (The system cannot find the path specified)
      at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(Unknown Source)
      at java.io.FileInputStream.<init>(Unknown Source)
      at java.io.FileInputStream.<init>(Unknown Source)
      at com.jcraft.jsch.Util.fromFile(Util.java:492)
      at com.jcraft.jsch.KeyPair.load(KeyPair.java:521)
      ... 6 more
      ERROR: Cvs task failed
      Finished: FAILURE

          [JENKINS-36841] ERROR: CVS Authentication failed: null. But selected ssh as protocol

          preejith vv added a comment -

          CVS Client (Plugin) : Version 2.12
          Jenkin version : 2.6
          JDK : 7

          preejith vv added a comment - CVS Client (Plugin) : Version 2.12 Jenkin version : 2.6 JDK : 7

          Dmitry Mikhirev added a comment - - edited

          I experience the same issue on linux. I use 'yet another docker plugin' to provision slaves.

          Using locally configured password for connection to :ext:user@host:/CVS
          cvs checkout -P -N -D 31 Aug 2016 15:35:06 +0000 project
          ERROR: CVS Authentication failed: null
          org.netbeans.lib.cvsclient.connection.AuthenticationException: SSH connection failed.
          	at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:141)
          	at org.netbeans.lib.cvsclient.Client$1.run(Client.java:374)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: /var/jenkins_home/.ssh/id_rsa (No such file or directory)
          	at com.jcraft.jsch.KeyPair.load(KeyPair.java:524)
          	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
          	at com.jcraft.jsch.JSch.addIdentity(JSch.java:389)
          	at com.jcraft.jsch.JSch.addIdentity(JSch.java:370)
          	at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:135)
          	... 2 more
          Caused by: java.io.FileNotFoundException: /var/jenkins_home/.ssh/id_rsa (No such file or directory)
          	at java.io.FileInputStream.open0(Native Method)
          	at java.io.FileInputStream.open(FileInputStream.java:195)
          	at java.io.FileInputStream.<init>(FileInputStream.java:138)
          	at java.io.FileInputStream.<init>(FileInputStream.java:93)
          	at com.jcraft.jsch.Util.fromFile(Util.java:492)
          	at com.jcraft.jsch.KeyPair.load(KeyPair.java:521)
          	... 6 more
          ERROR: Cvs task failed
          

          Of course there's no /var/jenkins_home directory on slave.
          The best solution would be to use jenkins credentials and do not look for id_rsa in filesystem.

          Dmitry Mikhirev added a comment - - edited I experience the same issue on linux. I use 'yet another docker plugin' to provision slaves. Using locally configured password for connection to :ext:user@host:/CVS cvs checkout -P -N -D 31 Aug 2016 15:35:06 +0000 project ERROR: CVS Authentication failed: null org.netbeans.lib.cvsclient.connection.AuthenticationException: SSH connection failed. at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:141) at org.netbeans.lib.cvsclient.Client$1.run(Client.java:374) at java.lang.Thread.run(Thread.java:745) Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: /var/jenkins_home/.ssh/id_rsa (No such file or directory) at com.jcraft.jsch.KeyPair.load(KeyPair.java:524) at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40) at com.jcraft.jsch.JSch.addIdentity(JSch.java:389) at com.jcraft.jsch.JSch.addIdentity(JSch.java:370) at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:135) ... 2 more Caused by: java.io.FileNotFoundException: /var/jenkins_home/.ssh/id_rsa (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at com.jcraft.jsch.Util.fromFile(Util.java:492) at com.jcraft.jsch.KeyPair.load(KeyPair.java:521) ... 6 more ERROR: Cvs task failed Of course there's no /var/jenkins_home directory on slave. The best solution would be to use jenkins credentials and do not look for id_rsa in filesystem.

          Well, I figured out that this path can be changed in configuration. Although setting the default value to '~/.ssh/id_rsa' would be more robust. Also using credentials is much more convenient than looking for key in filesystem.

          Dmitry Mikhirev added a comment - Well, I figured out that this path can be changed in configuration. Although setting the default value to '~/.ssh/id_rsa' would be more robust. Also using credentials is much more convenient than looking for key in filesystem.

            Unassigned Unassigned
            preejith preejith vv
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: