Making CVS and CVS with SSH work on a Windows computer can be a daunting task. With the newest releases of a couple of programs and some clear instructions, this is not as difficult as it once was. This document tries to explain in a step by step and easy to follow manner the tasks you must complete to make it work on your computer.
With the proliferation of open source projects and the success of the SourceForge web site, the need for a working CVS/SSH solution on the Windows platform has become acute for many developers. To set up CVS and SSH, you must perform the following tasks:
This explanation assumes you are using TortoiseCVS and PuTTY. Note that you don't need the entire PuTTY package: only puttygen.exe and pageant.exe is used here.
You can download TortoiseCVS from http://www.tortoisecvs.org. Make sure you get version 0.53 or later as this version has (almost) automatic SSH support.
Download PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/. Either download the entire package or choose the puttygen.zip and the pageant.zip files. Install the programs to a folder of your own choice. It is a good idea to put PuTTy in a sub folder of TortoiseCVS.
You should now be able to make anonymous connections to the CVS repository. TortoiseCVS makes this really simple:
Start your web browser and open the project page of the SourceForge project you are interested in. Click the CVS link in the menu bar. The page explains how to setup anonymous access, like this (this example is taken from the JEDI VCL page on SF, but others look the same):
Anonymous CVS Access
This project's SourceForge CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be
specified as the modulename. When prompted for a password for anonymous, simply press the Enter key.
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jvcl login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jvcl co modulename
To do a checkout, right-click on the folder where you would like to put the files you are going to check out (a sub folder with the modulename will be created automatically) and click the CVS Checkout menu item. Copy the yellow selection above into the CVSROOT edit field like this:
Notice how TortoiseCVS fills in the other fields automatically for you. The only thing you have to add yourself is the module name. You can either click the Fetch list button to get all available modules or type in the name manually. For JVCL3, use dev/JVCL3 as the modulename.
Note:
Module names are case-sensitive!
Click the OK button and all the units and folders will be downloaded to your computer. If you get a password prompt, just press ENTER. If you get a prompt asking you if you trust this server, click Yes.
To be able to checkout modules using SSH, you need a SourceForge account, developer access status to the project and SSH enabled on your computer.
To enable SSH, you only need to do one thing: add an environment variable.
In Windows NT, right-click the "My computer" icon on the desktop and select "Properties" from the menu. In the dialog, click the "Advanced" tab and then the button "Environment variables". On the user variables list, click add and enter the following values:
Name - CVS_RSH Value - ssh
Click OK and OK to close the dialogs.
Now you need a SourceForge account (unless you already have one). Go to SourceForge (http://sf.net) and create a new user account. When you've done this, one of the JVCL admins need to grant you developer access to the project. To contact a project admin, send him a mail or post a request in the bug tracker or in the newsgroups.
You should now be able to access the project via SSH. The actual command to checkout via CVS is on the CVS page of the project:
Developer CVS Access via SSH
Only project developers can access the CVS tree via this method. SSH1 must be installed on your client machine. Substitute modulename and developername with
the proper values. Enter your site password when prompted.
export CVS_RSH=ssh
cvs -z3 -d:ext:developername@cvs.sourceforge.net:/cvsroot/jvcl co modulename
Doing the same as when you made an anonymous checkout, right-click the folder where you would like to put the files and select CVS Checkout from the menu.
Paste the marked line above into the CVSROOT field, replace developername with your SourceForge login name and either click Fetch List or enter the module name manually.
Here's how the TortoiseCVS dialog should look like when doing a SSH checkout (replace "peter3" with your SourceForge developer name):

You will now be prompted by TortoiseCVS for a password. This is your SourceForge password. Type it in and press ENTER. The files and folders from the CVS repository are now downloaded to the selected folder.
Constantly entering the password to the CVS repository quickly gets tedious, but there is a simple way to fix this. By creating a private/ public key pair with puttygen, you can use PageAnt to handle the login for you.
When this is set up correctly, you only need to enter the pass phrase in PageAnt at startup and the rest will be automatic.
Begin by running puttygen.exe and create a new key pair. Save both keys on your computer (I recommend the TortoiseCVS folder with the names identity.prv and identity.pub). Note that you don't need to specify a pass phrase for the keys, but it is slightly more secure than leaving them empty. If you are the only person with access to your computer, you probably won't need a pass phrase.
You now need to upload your public key to SourceForge so SSH can find it when you need to login.
To do this, select and copy all the text in the memo field in puttygen. Start your web browser and go to your own page on SourceForge (https://sourceforge.net/my), login (if prompted to do so) and click the Account Options menu item at the top of the page.
Browse to the bottom were it says Host Access Information and click the [Edit Keys] link. In the new page, paste the text copied from puttygen into the memo field and click the Update button.
Create a new shortcut on your desktop and make it point to pageant.exe. Right-click the new link and select Properties. In the Target field, append a space and the path and filename to the private key file you just saved and created. Save and double-click the link to start PageAnt. Enter the pass phrase if you use one. Verify that your key has been loaded by right-clicking the PageAnt icon in the tray and select View Keys: there should be one key in the list.
Tip:
Copy / move the PageAnt link to your AutoStart/Startup folder to run PageAnt automatically at boot time.
Now when you Checkout, Update, Diff, Commit etc in CVS projects that require SSH, you should not have to enter your password. If TortoiseCVS still prompts you, go over this document again and make sure you've done everything correctly. If you've downloaded a project using anonymous access and later want to change to SSH access, it's easiest to completely delete the folder and start from scratch.
If for some reason you can't do that, you could open every Root file (in the CVS subfolders) with Notepad and manually change the cvs path in them from ":pserver" to ":ext" and replace "anonymous" with your SF name and try a CVS Update after that.
Arthur Hoogervorst provided these instructions for WinCVS:
For more information on how to use CVS you can read the Tortoise tutorial, or the official CVS manual