Using NetBeans with SourceForge (Win32)

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 and 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 my_ strings.

$ c:\progra~1\putty\plink -ssh -i c:\my_safe_dir\SourceForge-shell.ppk
Using username "my_sf_id".
Last login: Wed May 27 16:20:41 2006 from

Welcome to

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) 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 Next.

Categories : Java, Tech

Re: Using NetBeans with SourceForge (Win32)

Thanks - just what I needed!

Re: Using NetBeans with SourceForge (Win32)

You are the only one that gives a proper description about how to connect to cvs server using netbeans. I use netbeans 5.0, and I've tried several times to connect to cvs server using your approach. No matter what I do I get the message "Please check username, password and repository". when I run the command from command line i manage to successfully log on, I get this message: Welcome to This is a restricted Shell Account You cannot execute anything here. then the process breaks. So I guess this is correct ? Frustrating not being able to use netbeans with CVS

Re: Using NetBeans with SourceForge (Win32)

You need to be *very* careful to make sure the string used to connect in NetBeans is correct - if it isn't you'll just get a generic failure message like the one you are seeing.

Re: Using NetBeans with SourceForge (Win32)

Great guide! I was looking for this to set up a project for school, using NetBeans.

Re: Using NetBeans with SourceForge (Win32)

Thank you man!!!... great post!!