FeaturesPluginsDocs & SupportCommunityPartners

Using NetBeans 4.1 CVS and SourceForge


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.

Requirements :

An SSH client

A CVS Client

A Sourceforge Account

NetBeans 4.1

  • Your favorite IDE isn't it?
  • Hey! it works with Forte too :-)

Step by Step

From the SourceForge Docs :

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.

  1. 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

  2. If you are working with win32 and don't know what is $HOME can, add a environment variable HOME=c:/home

  3. 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 :

    1024 35
    10838823654025632223395373316725638023042917037705851955563467949272222
    84084188520256297285249606096033260043138902890425913983431023080569461
    45928763175224386972881580732340640785610928607357763318997680030944733
    16465240380276054881569427929109079749734650741374791500471676522076287
    025779823323332003106453751471 

    • Hit the "Update" button at the end of the page.

    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.

  4. 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.

  5. If this is your first time with cvs and sourceforge please read this guide: Importing an Existing CVS Repository to SourceForge.net

  6. Open you favorite IDE NetBeans 4.1/Forte

    • 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

  7. That's It!

    That's the best part, you don't have to do anything else, just commit, update, add, etc.

Using PuTTY

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

Some additional Links/Resources :


 

Bookmark this page

del.icio.us furl simpy slashdot technorati digg
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by