Invalid private key sounds like your private key isn't in the correct format for JSch to read, or that you're pointing at the wrong file. A quick google of "JSch invalid private key" will show you how to convert your key into the OpenSSH key format expected by JSch, otherwise looking at your settings on the global config screen should tell you if you're pointing at the right key file.
Thanks Michael On 30 May 2013, at 07:48, Stijn <stijn.deroovanma...@gmail.com> wrote: Hi, Thanks for your answer. I tried the command you said Jenkins uses, and I get following: jenkins@p-hplj1320:/tmp$ cvs checkout -P -N -D '29 May 2013 11:38:14 +0200' -d workspace vcs/c/arm-elf-gcc cvs checkout: No CVSROOT specified! Please use the `-d' option cvs [checkout aborted]: or set the CVSROOT environment variable. If I check the CVSROOT variable in Jenkins, it is set like the command I use in the terminal, so this should be the same?! I still get the *invalid private key* error when I perform the build. Kind regards, Stijn. Op woensdag 29 mei 2013 18:33:31 UTC+2 schreef Stijn het volgende: > > Hi, > > I try to use cvs with jenkins in Debian, but I'm unable to access the cvs > server. > > Build error message: > > Started by user anonymous <http://localhost:8080/user/null> > Building in workspace /var/lib/jenkins/jobs/pr_7611/workspace > cvs checkout -P -D 29 May 2013 18:11:37 +0200 -d workspace vcs/c/arm-elf-gcc > ERROR: CVS Authentication failed: > nullorg.netbeans.lib.cvsclient.connection.AuthenticationException > <http://stacktrace.jenkins-ci.org/search?query=org.netbeans.lib.cvsclient.connection.AuthenticationException>: > SSH connection failed. > at > org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:141) > > <http://stacktrace.jenkins-ci.org/search/?query=org.netbeans.lib.cvsclient.connection.SSHConnection.open&entity=method> > at org.netbeans.lib.cvsclient.Client$1.run(Client.java:374) > <http://stacktrace.jenkins-ci.org/search/?query=org.netbeans.lib.cvsclient.Client$1.run&entity=method> > at java.lang.Thread.run(Thread.java:679) > <http://stacktrace.jenkins-ci.org/search/?query=java.lang.Thread.run&entity=method> > Caused by: com.jcraft.jsch.JSchException > <http://stacktrace.jenkins-ci.org/search?query=com.jcraft.jsch.JSchException>: > invalid privatekey: /home/jenkins/.ssh/identity > at com.jcraft.jsch.IdentityFile.<init>(IdentityFile.java:302) > <http://stacktrace.jenkins-ci.org/search/?query=com.jcraft.jsch.IdentityFile.%3Cinit%3E&entity=method> > at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:135) > <http://stacktrace.jenkins-ci.org/search/?query=com.jcraft.jsch.IdentityFile.newInstance&entity=method> > at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:130) > <http://stacktrace.jenkins-ci.org/search/?query=com.jcraft.jsch.IdentityFile.newInstance&entity=method> > at com.jcraft.jsch.JSch.addIdentity(JSch.java:224) > <http://stacktrace.jenkins-ci.org/search/?query=com.jcraft.jsch.JSch.addIdentity&entity=method> > at com.jcraft.jsch.JSch.addIdentity(JSch.java:218) > <http://stacktrace.jenkins-ci.org/search/?query=com.jcraft.jsch.JSch.addIdentity&entity=method> > at > org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:135) > > <http://stacktrace.jenkins-ci.org/search/?query=org.netbeans.lib.cvsclient.connection.SSHConnection.open&entity=method> > ... 2 more > ERROR: Cvs task failedFinished > <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE > > > > However, if I do following on a command line, it works (as user jenkins): > > *jenkins@p-hplj1320:/tmp$* cvs -d SDR@lx-cvs:/CVS/dev checkout -P -N -D > '29 May 2013 11:38:14 +0200' vcs/c/arm-elf-gcc > cvs server: Updating vcs/c/arm-elf-gcc > cvs server: Updating vcs/c/arm-elf-gcc/arm-elf > cvs server: Updating vcs/c/arm-elf-gcc/arm-elf/bin > U vcs/c/arm-elf-gcc/arm-elf/bin/ar > U vcs/c/arm-elf-gcc/arm-elf/bin/as > U vcs/c/arm-elf-gcc/arm-elf/bin/c++ > U vcs/c/arm-elf-gcc/arm-elf/bin/g++ > U vcs/c/arm-elf-gcc/arm-elf/bin/gcc > U vcs/c/arm-elf-gcc/arm-elf/bin/ld > ^Ccvs [checkout aborted]: received interrupt signal > cvs [checkout aborted]: received interrupt signal > > > Why is Jenkins complaining my private key is invalid, while with the > command line it works? > > Kind regards and thanks in advance! > Stijn. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.