Friday, July 29, 2005

CruiseControl.NET, CVS and SSH password

I tried to setup up a build server using CruiseControl.NET (CCNET for short) and am not happy about CCNET's documentation. My CVS server is only accessible via SSH and it's password protected. I need to give CCNET a password so that it can login itself (btw, using public/private key provides few security improvement here, you better have a limited account for read only CVS access so that a tool like CCNET can use). I started to read the documentation, but soon lost on this page(Using CruiseControl.NET with CVS). It simply mentiones:
"An example file is 'plinkwithpw.bat' in the tools sub-directory."

But guess where is the tools sub-directory? I searched my installation dir and found nothing. And it's turned out to be in their CVS! Since The script is so short, why not just put it in the documentation?

The documentation page does no allow me to edit (not even to add a comment), so I just post the script here:

0. I use Tortoise CVS in this example, so cvs.exe and plink.exe (renamed as TortoisePlink.exe) are already on my computer(C:\Program Files\TortoiseCVS). If you do not have one you need to download them.

1. Create plinkwithpw.bat like this:
@"C:\Program Files\TortoiseCVS\TortoisePlink.exe" -pw yourpassword %*

2. Create cvswithplinkrsh.bat like this:
@echo off
set CVS_RSH="C:\Program Files\TortoiseCVS\plinkwithpw.bat"
"c:\Program Files\TortoiseCVS\cvs.exe" %*

3. Edit ccnet.config to have something like this:

<sourcecontrol type="cvs">
<executable>C:\Program Files\TortoiseCVS\cvswithplinkrsh.bat</executable>
<workingDirectory>C:\projects\YourProject</workingDirectory>
</sourcecontrol>

1 Comments:

Anonymous Anonymous said...

God bless you for posting this!

2:12 PM  

Post a Comment

<< Home