CVS and extssh

2,353 views
Skip to first unread message

Xavier NOPRE

unread,
May 2, 2012, 8:41:13 AM5/2/12
to jenkins...@googlegroups.com
Hi,

I've just installed the last version of Jenkins. I have created a first job for a Maven project. But my problem is with CVS. In Eclipse, my CVS URL is with ":extssh:" prefix. But with Jenkins, I have this error : "cvs checkout: Unknown method (`extssh') in CVSROOT.".

My server OS is Windows. I have installed cvs.exe in c:\windows.

How can I solve this problem ? Do I have to install some CVS extension for the extssh support ?

Thanks,

Xavier

HARDION Vincent

unread,
May 2, 2012, 8:58:03 AM5/2/12
to jenkins...@googlegroups.com
Hi Xavier,

The "extssh" tag exists only for eclipse.
The real type of connection for cvs is "ext".

Best regards,

Vincent
________________________________
From: jenkins...@googlegroups.com [jenkins...@googlegroups.com] on behalf of Xavier NOPRE [xno...@gmail.com]
Sent: Wednesday, May 02, 2012 2:41 PM
To: jenkins...@googlegroups.com
Subject: CVS and extssh

Xavier NOPRE

unread,
May 2, 2012, 9:04:15 AM5/2/12
to jenkins...@googlegroups.com
Hi Vincent,

Thank you for your quick answer.

So, I have tried with "ext", just replacing "extssh" with "ext" in my CVS URL, and I have another error. Sorry, it's in french, but the error seems to be with a RSH command. In the console, I can see like the help of RSH command and the this error : cvs [checkout aborted]: end of file from server (consult above messages if any)

Thanks,

Xavier



2012/5/2 HARDION Vincent <vincent...@synchrotron-soleil.fr>

Tim Pizey

unread,
May 2, 2012, 9:10:41 AM5/2/12
to jenkins...@googlegroups.com
There seem to be some relevant instructions here:

http://www-d0.fnal.gov/software/cmgt/cvs_ssh.html

you need to have an environment variable
CVS_RSH set to your ssh executable.

my guess.
Tim
--
Tim Pizey - http://pizey.net/~timp

Jan Seidel

unread,
May 3, 2012, 5:41:32 AM5/3/12
to jenkins...@googlegroups.com, tim....@gmail.com
I agree on that.
go to manage jenkins and create a new global property.
name: CVS_RSH
value: c:\"program files"\PuTTY\plink_h.bat   (Depends on the agent you are using. with pageant you will have to enter the path and filename of plink_h.bat)

Take care


Am Mittwoch, 2. Mai 2012 15:10:41 UTC+2 schrieb TimP:
There seem to be some relevant instructions here:

http://www-d0.fnal.gov/software/cmgt/cvs_ssh.html

you need to have an environment variable
CVS_RSH set to your ssh executable.

my guess.
Tim


On 2 May 2012 14:04, Xavier NOPRE <xno...@gmail.com> wrote:
> Hi Vincent,
>
> Thank you for your quick answer.
>
> So, I have tried with "ext", just replacing "extssh" with "ext" in my CVS
> URL, and I have another error. Sorry, it's in french, but the error seems to
> be with a RSH command. In the console, I can see like the help of RSH
> command and the this error : cvs [checkout aborted]: end of file from server
> (consult above messages if any)
>
> Thanks,
>
> Xavier
>
>
>
>
> 2012/5/2 HARDION Vincent <vincent.hardion@synchrotron-soleil.fr>
>>
>> Hi Xavier,
>>
>> The "extssh" tag exists only for eclipse.
>> The real type of connection for cvs is "ext".
>>
>> Best regards,
>>
>> Vincent
>> ________________________________
>> From: jenkinsci-users@googlegroups.com [jenkinsci-users@googlegroups.com]
>> on behalf of Xavier NOPRE [xno...@gmail.com]
>> Sent: Wednesday, May 02, 2012 2:41 PM
>> To: jenkinsci-users@googlegroups.com

Xavier NOPRE

unread,
May 9, 2012, 5:53:19 AM5/9/12
to jenkins...@googlegroups.com
Hi all,

Thanks for your replies and sorry for my delay to answer ...

I have tried your solutions. I have installed Putty and defined a CVS_RSH env variable with the path "c:\Program Files\PuTTY\plink.exe". No success ...

But today, I saw that Jenkins proposed me to install CVS plug-in. I do it. Now, the configuration is not the same, I can see a field "Private Key Location" with value "C:\Documents and Settings\Default User/.ssh/id_rsa", etc ... And now, in the job console, the error is :

ERROR: CVS Authentication failed: null
org.netbeans.lib.cvsclient.connection.AuthenticationException: SSH connection failed.
...
Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Documents and Settings\Default User\.ssh\id_rsa (Le fichier spécifié est introuvable)
How can I generate this key ?

Thansk,

Xavier


2012/5/3 Jan Seidel <wakk...@gmail.com>

HARDION Vincent

unread,
May 9, 2012, 6:15:29 AM5/9/12
to jenkins...@googlegroups.com
Hi,

Search "putty generate key" and you will find some site like :
http://kb.siteground.com/article/How_to_generate_an_SSH_key_on_Windows_using_PuTTY.html.

And generate a key in the supported format by your server.

br,

Vincent

________________________________
From: jenkins...@googlegroups.com [jenkins...@googlegroups.com] on behalf of Xavier NOPRE [xno...@gmail.com]
Sent: Wednesday, May 09, 2012 11:53 AM
To: jenkins...@googlegroups.com
Subject: Re: CVS and extssh

Hi all,

Thanks for your replies and sorry for my delay to answer ...

I have tried your solutions. I have installed Putty and defined a CVS_RSH env variable with the path "c:\Program Files\PuTTY\plink.exe". No success ...

But today, I saw that Jenkins proposed me to install CVS plug-in. I do it. Now, the configuration is not the same, I can see a field "Private Key Location" with value "C:\Documents and Settings\Default User/.ssh/id_rsa", etc ... And now, in the job console, the error is :


ERROR: CVS Authentication failed: null
org.netbeans.lib.cvsclient.connection.AuthenticationException<http://stacktrace.jenkins-ci.org/search?query=org.netbeans.lib.cvsclient.connection.AuthenticationException>: SSH connection failed.
...
Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Documents and Settings\Default User\.ssh\id_rsa (Le fichier spécifié est introuvable)

How can I generate this key ?

Thansk,

Xavier


2012/5/3 Jan Seidel <wakk...@gmail.com<mailto:wakk...@gmail.com>>
I agree on that.
go to manage jenkins and create a new global property.
name: CVS_RSH
value: c:\"program files"\PuTTY\plink_h.bat (Depends on the agent you are using. with pageant you will have to enter the path and filename of plink_h.bat)

Take care

Am Mittwoch, 2. Mai 2012 15:10:41 UTC+2 schrieb TimP:
There seem to be some relevant instructions here:

http://www-d0.fnal.gov/software/cmgt/cvs_ssh.html

you need to have an environment variable
CVS_RSH set to your ssh executable.

my guess.
Tim


On 2 May 2012 14:04, Xavier NOPRE <xno...@gmail.com<mailto:xno...@gmail.com>> wrote:
> Hi Vincent,
>
> Thank you for your quick answer.
>
> So, I have tried with "ext", just replacing "extssh" with "ext" in my CVS
> URL, and I have another error. Sorry, it's in french, but the error seems to
> be with a RSH command. In the console, I can see like the help of RSH
> command and the this error : cvs [checkout aborted]: end of file from server
> (consult above messages if any)
>
> Thanks,
>
> Xavier
>
>
>
>
> 2012/5/2 HARDION Vincent <vincent...@synchrotron-soleil.fr<mailto:vincent...@synchrotron-soleil.fr>>
>>
>> Hi Xavier,
>>
>> The "extssh" tag exists only for eclipse.
>> The real type of connection for cvs is "ext".
>>
>> Best regards,
>>
>> Vincent
>> ________________________________
>> From: jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com> [jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com>]
>> on behalf of Xavier NOPRE [xno...@gmail.com<mailto:xno...@gmail.com>]
>> Sent: Wednesday, May 02, 2012 2:41 PM
>> To: jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com>
>> Subject: CVS and extssh
>>
>> Hi,
>>
>> I've just installed the last version of Jenkins. I have created a first
>> job for a Maven project. But my problem is with CVS. In Eclipse, my CVS URL
>> is with ":extssh:" prefix. But with Jenkins, I have this error : "cvs
>> checkout: Unknown method (`extssh') in CVSROOT.".
>>
>> My server OS is Windows. I have installed cvs.exe in c:\windows.
>>
>> How can I solve this problem ? Do I have to install some CVS extension for
>> the extssh support ?
>>
>> Thanks,
>>
>> Xavier
>>
>



--
Tim Pizey - http://pizey.net/~timp<http://pizey.net/%7Etimp>

Xavier NOPRE

unread,
May 9, 2012, 6:24:44 AM5/9/12
to jenkins...@googlegroups.com
Hi Vincent,

Thank you for your reply.


Search "putty generate key" and you will find some site like :
http://kb.siteground.com/article/How_to_generate_an_SSH_key_on_Windows_using_PuTTY.html.

And generate a key in the supported format by your server.

Yes, I had tired this, I have just tried another time, but in jenkins job console, I have this error :

JSchException: invalid privatekey
I think that this method is to generate a key on a server, and I think that in Jenkins, I have to indicate a key relative to the server I have to connect to, no ?

Thanks,

Xavier


HARDION Vincent

unread,
May 9, 2012, 6:33:29 AM5/9/12
to jenkins...@googlegroups.com
Did you export your putty key to the openssh format ?
Did you make your key with a passphrase ?

________________________________
From: jenkins...@googlegroups.com [jenkins...@googlegroups.com] on behalf of Xavier NOPRE [xno...@gmail.com]
Sent: Wednesday, May 09, 2012 12:24 PM
To: jenkins...@googlegroups.com
Subject: Re: CVS and extssh

Xavier NOPRE

unread,
May 9, 2012, 6:40:06 AM5/9/12
to jenkins...@googlegroups.com
Hi,

Did you export your putty key to the openssh format ?
Did you make your key with a passphrase ?

Sorry, I don't understand your questions ... :-(

I have to indicate a key file to Jenkins to connect to the server (not my server).

I think that this key file is depending on the server, no ?
Can I simply generate it on my computer ? I don't think so ...

Thanks,

Xavier


HARDION Vincent

unread,
May 9, 2012, 7:46:46 AM5/9/12
to jenkins...@googlegroups.com
In general the ssh keys are generated onto the client side then the public key is sent to the server.
Example with Sourceforge : http://sourceforge.net/apps/trac/sourceforge/wiki/SSH%20keys

Vincent
________________________________
From: jenkins...@googlegroups.com [jenkins...@googlegroups.com] on behalf of Xavier NOPRE [xno...@gmail.com]
Sent: Wednesday, May 09, 2012 12:40 PM
To: jenkins...@googlegroups.com
Subject: Re: CVS and extssh

Jan Seidel

unread,
May 10, 2012, 4:30:51 AM5/10/12
to jenkins...@googlegroups.com
Hi Xavier,

you should not define "c:\Program Files\PuTTY\plink.exe". but "c:\Program Files\PuTTY\plink_h.bat".
The batch file is calling plink.exe with %1 %2 %3 and so on. The batch file tells your agent which key to use/keep available.
You are currently just calling the agent with an empty keystore.


"Did you export your putty key to the openssh format ?
Did you make your key with a passphrase ? "


You can create your keys in different formats, denpendig on your system will some formats work, others not. OpenSSH is the best choice as it is platform independent.
Validate your key from the commandline before you start to poke around the system for the bug.

start -> run... -> cmd [OK] -> C:\Program Files\PuTTY\plink -l [user name] your_server.your_domain.com
This command will open a remote shell to the server and introduce your key to the server as well as the server publishes it's own key which you should store permanently when getting asked.

You will normally become told what the reason is if it ain't working.
This step is compulsory to get finished successfully. Any troubleshooting beyond this point is senseless if you can't establish the connection from command line.

Take care
Jan

Jan Seidel

unread,
May 10, 2012, 4:33:05 AM5/10/12
to jenkins...@googlegroups.com
Disregard - you should not define "c:\Program Files\PuTTY\plink.exe". but "c:\Program Files\PuTTY\plink_h.bat". -
That is a personalized file :)

Xavier NOPRE

unread,
May 24, 2012, 10:12:23 AM5/24/12
to jenkins...@googlegroups.com
It seems to work with c:\Program Files\PuTTY\plink.exe .... but not sure, because with have defined login in CVS URL + password, perhaps it overpasses the key verification .... ?

Xavier




2012/5/10 Jan Seidel <wakk...@gmail.com>

Sascha G.

unread,
Jul 26, 2012, 3:43:00 AM7/26/12
to jenkins...@googlegroups.com
Hi,

I had the same problem with the SSH connection for a CVS export with Jenkins-CI.
The solution was to convert the PuTTy-generated SSH .ppk into an OpenSSH file. After that it works great!

Regards,
Sascha

Rodri

unread,
Aug 6, 2012, 2:24:36 PM8/6/12
to jenkins...@googlegroups.com
Hi,
After following all the instructions above:
  • Jenkins conf -> CVSROOT = :ext:<PuttySession>: <path>
  • Env var-> CVS_RSH = path to plink.exe
  • Public key copied in the server
  • able to ssh to the server using windows cli and plink without typing the password
  • able to connect to cvs using cli
I'm still getting an error:

cvs checkout -P -r BBB -d workspace XXX 
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: Session.connect: java.net.ConnectException: Connection timed out: connect
	at com.jcraft.jsch.Session.connect(Session.java:525)
	at com.jcraft.jsch.Session.connect(Session.java:160)
	at org.netbeans.lib.cvsclient.connection.SSHConnection.open(SSHConnection.java:139)
	... 2 more
ERROR: Cvs task failed
Finished: FAILURE

Any clue?
Thanks in advance!
Regards
Rodri

Sascha G

unread,
Aug 9, 2012, 3:10:15 AM8/9/12
to jenkins...@googlegroups.com
Hi,

I don't know how I configured it... It's to long ago, but cvs didn't work well (to much empty lines because missing 
-kb parameter). My solution was very easy... I created an Apache ANT script for update / checkout my CVS repository. That's much faster and not very complicated. There are many good tutorials for using CVS with ANT. And you can simply "invoke ANT" into a jenkins job (with monitoring).

Regards
Sascha

2012/8/6 Rodri <rle...@technisys.net>

John McCabe

unread,
Jun 11, 2013, 9:50:35 AM6/11/13
to jenkins...@googlegroups.com, cybe...@googlemail.com


On Thursday, 9 August 2012 08:10:15 UTC+1, Sascha G wrote:
Hi,

I don't know how I configured it... It's to long ago, but cvs didn't work well (to much empty lines because missing 
-kb parameter). My solution was very easy... I created an Apache ANT script for update / checkout my CVS repository. That's much faster and not very complicated. There are many good tutorials for using CVS with ANT. And you can simply "invoke ANT" into a jenkins job (with monitoring).

Regards
Sascha

It looks like I have a similar problem; here we have CVSNT and it's set up to use SSPI with authentication based on our user ids on windows. I've tried everything I can find, other than the SSH key stuff (as I don't have any control over the server side) and can't get this stuff to work. I've tried your suggestion Sascha and, yes, it works but I'd really like to be able to use the CVS plug-in to do this stuff as I understand that's what gives the list of changes after processing the rlog output. I presume also that this is needed to use the PollSCM feature.

If anyone has any more information on this that would be useful.

I'm aware that Jenkins uses the Netbeans JavaCVS client but I've had a look through the JavaCVS code and can't see that it handes the :ext: protocol in the way I want it to, even with CVS_RSH etc set.

John

Sarma Sarma

unread,
Jan 21, 2015, 3:16:07 PM1/21/15
to jenkins...@googlegroups.com, cybe...@googlemail.com
Hi Sascha,

Can you please help me with build file for ANT to get updates from CVS ?

Thanks,
Santhosh
Reply all
Reply to author
Forward
0 new messages