I've been looking for a few hours about how to use NetBeans 4.1 and
SourceForge and finally
here is the solution. Note this procedure uses an external CVS
client, not the built in NetBeans 4.1 CVS client.
The idea is that you have to generate your ssh keys and upload those
to SourceForge.
To avoid having to type your password every time for your CVS/SSH
developer account, you may upload your public key(s) here and they will
be placed on the CVS server in your ~/.ssh/authorized_keys file.
To generate a public key, run the program 'ssh-keygen' (or ssh-keygen1).
The public key will be placed at '~/.ssh/identity.pub'. Read the ssh
documentation for further information on sharing keys.
Generate Public SSH Keys
From the command line, type (all OSs)
ssh-keygen
This command will generate the necesary sigantures for your system. Those
will be saved at $HOME/.ssh/identity.pub
If you are working with win32 and don't know what is $HOME can, add a environment
variable HOME=c:/home
Upload Your Keys to SourceForge
Copy the result of Step 1) above to your SourceForge personal Web page -
Login to your SourceForge account;
Select Account Preferences;
Select Shell Account Information;
Edit Keys;
Copy your key into the "Authorized keys" Area. The key should look
something like :
And rememeber, you have to wait six hours to get the file uploaded
to SF servers, yep its the time to play a game or watch a movie...
Also Remember you gotta do that for each machine you work with.
Test Your Setup
Try to add/commit/update something from your console without having
to give your password. The recommended way is to do checkout from console:
cvs -z3 -d :ext:developername@cvs.projectname.sourceforge.net:/cvsroot/projectname co modulename
If everything is correct the cvs shouldn't ask you for password.
Invoke the "Mount CVS .." wizard by right-clicking on the Filesystems
node in the Filesystems tab of the Explorer.
On the CVS Client panel, select the CVS Command-Line Client
option; for Win32 browse to your WinCVS installation and select
cvs.exe, for Unix/Linux the default "cvs" is sufficient. I haven“t
tested with Built-In Client but it should work.
On the Connection Method panel, set
Connection Method : External : CVS_RSH = SSH
If you didn't step 3 then you should set up netbean's CVS
filesystem by hand, that means you should configure the CVS correctly
and passing those parameters:
Server Name: cvs.your_project.sourceforge.net
User Name: your_sourceforge's_username
Repository: /cvsroot/your_project
That's It!
That's the best part, you don't have to do anything else, just
commit, update, add, etc.
If you are using PuTTY the procedure is the same except for a couple of
things:
You will need plink.exe, which is the PuTTY command line client.
You will need to precreate a session in your
PuTTY configuration panel: the idea is that the saved session should have
all the parameters needed to connect and authenticate. These include the server name
(cvs.your_project.sourceforge.net) and your user name (set in Connection).
You should also either set the private key filename or enable agent forwarding
if you are using pagent (look in Connection/SSH/Auth).
A good way to test is open putty, double click on the saved session and see if
it connects by itself (it should also disconnect immediatly, since this is the
current setup of SourceForge).
Once you have created the session, the parameters to for step 3 are:
Connection Method : External : CVS_RSH = plink.exe
Server Name: your_putty_session
User Name: your_sourceforge's_username
Repository: /cvsroot/your_project