There are several different ways to access CVS on SourceForge, incl. command line tools, as well as Windows based, such as TortoiseCVS and WinCVS
(provided by Peter Thornqvist)
This document explains how to enable SSH (secure shell) access to a remote CVS repository when running on a MS Windows computer.
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 might seem. This document tries to explain in a step by step, 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: go to the SourceForge project you are interested in and click the CVS link in the menu bar. The CVS page explains how to setup anonymous CVS 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.jvcl.sourceforge.net:/cvsroot/jvcl login
cvs -z3 -d:pserver:anonymous@cvs.jvcl.sourceforge.net:/cvsroot/jvcl
co modulename
To 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 modules will be downloaded. 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.
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 a new user account if necessary. When you've done this, one of the project admins need to grant you developer access to the project.
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.jvcl.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 selected 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 SF developername)
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 tree should be created and downloaded on 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 couple of private and public identity keys with puttygen, you can then use pageant to handle the login for you. When this is set up correctly, you only need to enter the passphrase in PageAnt at startup and then all 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 have a passphrase for the keys, but it is slightly more secure than leaving them empty.
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. Next, 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 passphrase 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 the 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 you for some reason 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 try an Update after that.
|
For more information on how to use CVS you can see the Tortoise tutorial, or the official CVS manual
Credits: the above information is compiled from sources like:
http://www.savagesoftware.com.au/DelphiGamer/showarticles.php?articleid=6&page=1
http://akrip.sourceforge.net/cvs-ssh-win32-howto.txt
and based on help emails from Dominique Louis.
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.jvcl.sourceforge.net:/cvsroot/jvcl login
cvs -z3 -d:pserver:anonymous@cvs.jvcl.sourceforge.net:/cvsroot/jvcl co modulename
Updates from within the module's directory do not need the -d parameter.
Daily tarballs of entire project CVS Repositories are available for backup or mirroring purposes. These are available at: http://cvs.sourceforge.net/cvstarballs/jvcl-cvsroot.tar.gz .