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

Support :ext: using external shell like Netbeans instead of only internal SSH



    • Improvement
    • Resolution: Unresolved
    • Major
    • cvs-plugin
    • None
    • Windows 7 x64


      We have recently moved to using SSPI authentication on our CVS (CVSNT) system and now don't seem to be able to use the Jenkins CVS Plug-In to checkout our code. I've tried a rather large number of options to try to get this to work but nothing I do seems to change that fact that the plug-in appears to only attempt to use the internal ssh mechanism using public/private key authentication when a CVSROOT of the form :ext:<user>@<server>:/<repository>. The output is always something like I've added below.

      I'm aware that Jenkins uses the Netbeans JavaCVS client so I tried installing Netbeans to see how to get that to do the job. In the Netbeans CVS checkout there is an option to either use the Internal SSH, or use an External Shell. In the external shell box I was able to put:

      C:\Program Files (x86)\CVS Suite\CVSNT\extnt.exe <server>

      And it worked from that point. As you can see below I've tried adding CVS_RSH and CVS_SERVER environment variables to try to force this but it appears to have no effect. (Note that I've also tried CVS_EXE instead of CVS_SERVER, and the same without the underscore as the details on the internet are a bit inconsistent).

      I've set this to Major as it's quite important for us to be able to continue to use the CVS Plugin because of the integration to the change reporting on Jenkins. We can get round it using alternative methods, e.g. Ant task, Python script or whatever (hence the reason I haven't made this a Blocker) but that loses a lot of the benefit of Jenkins' built-in functionality.

      ========= Console Output ============
      11:13:44 Started by user McCabe, John
      11:13:44 [EnvInject] - Loading node environment variables.
      11:13:44 [EnvInject] - Preparing an environment for the build.
      11:13:44 [EnvInject] - Keeping Jenkins system variables.
      11:13:44 [EnvInject] - Keeping Jenkins build variables.
      11:13:44 [EnvInject] - Injecting as environment variables the properties content
      11:13:44 CVS_RSH=C:\Program Files (x86)\CVS Suite\CVSNT\extnt.exe
      11:13:44 CVS_SERVER=C:\Program Files (x86)\CVS Suite\CVSNT\cvs.exe
      11:13:44 [EnvInject] - Variables injected successfully.
      11:13:44 [EnvInject] - Injecting contributions.
      11:13:44 Building in workspace E:\Work\Jenkins
      11:13:44 cvs checkout -P -N -r <mybranch> <mymodule>
      11:13:44 ERROR: CVS Authentication failed: null
      11:13:44 org.netbeans.lib.cvsclient.connection.AuthenticationException: SSH connection failed.
      11:13:44 at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:141)
      11:13:44 at org.netbeans.lib.cvsclient.Client$1.run(Client.java:374)
      11:13:44 at java.lang.Thread.run(Unknown Source)
      11:13:44 Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Users\mccabe\.ssh\id_rsa (The system cannot find the path specified)
      11:13:44 at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:98)
      11:13:44 at com.jcraft.jsch.JSch.addIdentity(JSch.java:224)
      11:13:44 at com.jcraft.jsch.JSch.addIdentity(JSch.java:218)
      11:13:44 at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:135)
      11:13:44 ... 2 more
      11:13:44 Caused by: java.io.FileNotFoundException: C:\Users\mccabe\.ssh\id_rsa (The system cannot find the path specified)
      11:13:44 at java.io.FileInputStream.open(Native Method)
      11:13:44 at java.io.FileInputStream.<init>(Unknown Source)
      11:13:44 at java.io.FileInputStream.<init>(Unknown Source)
      11:13:44 at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:83)
      11:13:44 ... 5 more
      11:13:44 ERROR: Cvs task failed
      11:13:44 Finished: FAILURE


        Issue Links



              Unassigned Unassigned
              jmccabe John McCabe
              3 Vote for this issue
              5 Start watching this issue