cvs cli on windows with ssh

At work and home I use plain vanilla cvs for my personal code repository. Although things work well enough on Linux, I found the situation on Windows to be quite another matter.

Because I have almost a decade of experience with it, I find using cvs at the command line the most efficient way to work with code repositories.

Here’s my recipe for getting things working on a Windows machine.

1. Get cvs for Win32 and extract it someplace in your PATH.

cvs-1-11-22.zip

unzip cvs-1-11-22.zip -d c:appsbincvs.exe

PATH...;c:appsbin

2. Configure PuTTY.

Add it to the system PATH, PATH ...;c:appsputty.

Use pageant to store your private key and make sure it is running resident. See PuTTY and Passwordless SSH Logins.

Copy your public key to your corresponding account on the Unix cvs server as:

~/.ssh/authorized_keys

3. Set environment variables for cvs (very important).

Create CVS_RSH, with path to PuTTY plink command.

CVS_RSH c:appsputtyplink.exe

Create CVSROOT, with value user@fqdn:[path-to-cvsroot].

CVSROOT phil@mine.example.com:/usr/local/cvs

4. Test by checking out a module.

Try simply doing “cvs checkout [module name].

cvs checkout myscripts

If that doesn’t work try the extended command line method.

cvs -d :ext:user@host:/opt/cvs mymodule>