I have a Win32 project hosted on SourceForge, and as it took me a bit of fiddling to get NetBeans to work with the SourceForge CVS server I thought I'd document the steps needed - although there is some information on the NetBeans and SourceForge sites, there isn't an all-in-one guide.
The prerequisites are that you already have NetBeans installed, and that you have an account on SourceForge.
The first step is to grab a copy of PuTTY if you don't already have it - PuTTY is a telnet/ssh client and you'll need it to connect via SSH to SourceForge.
Once you have PuTTY installed, use the PuTTYgen utility to generate a new SSH key. It's easiest if you save the keys without a passphrase - if you don't you'll have to run the Pageant authentication agent that comes with PuTTY and load your key into it before trying to connect to SourceForge. If you do decide to save them without a passphrase, make sure you put the files somewhere safe! Save both the public and private key files - I used the filenames
SourceForge-shell.ppk. Also export the private key as a OpenSSH key (
Conversions->Export OpenSSH Key), I saved mine in a file called
SourceForge-shell.openssh. Leave PuTTYgen open - you'll need it in the next step.
Go to the Edit SSH Keys page on SourceForge and cut+paste the contents of the box in PuTTYgen labelled
Public key for pasting into OpenSSH authorized_keys file into the SourceForge
Authorized keys: form, and press submit. It will take at least 10 minutes for SourceForge to update your keys.
After waiting, check you can connect to the CVS server on SourceForge from the command-line before setting up NetBeans. Start up a command prompt and run the PuTTY
plink command to check that you can connect to the SourceForge CVS server. In the example below, substitute in the appropriate values for your setup for all the
$ c:\progra~1\putty\plink -ssh -i c:\my_safe_dir\SourceForge-shell.ppk my_sf_id@my_sf_project.cvs.sourceforge.net Using username "my_sf_id". Last login: Wed May 27 16:20:41 2006 from 192.168.1.1 Welcome to cvs1.sourceforge.net This is a restricted Shell Account You cannot execute anything here. $
Once you have checked you can access SourceForge CVS from the command-line, set up access in NetBeans. Select
CVS->Checkout and for
CVS Root enter (substituting the
my_ values appropriately, as in the command-line test)
:ext:my_sf_id@my_sf_project.cvs.sourceforge.net:/cvsroot/my_sf_project. Select the
Use External Shell button and in the
SSH Command box enter
c:\program files\putty\plink -ssh -i c:\my_safe_dir\SourceForge-shell.ppk, then press
Next. NetBeans will then connect to SourceForge and you can browse and checkout modules from CVS.
One thing to note - if you subsequently come back to the
Checkout dialog, the
Use External Shell setting doesn't 'stick', so you will have to relselect the button before pressing