Tuesday, August 04, 2009

Setting up Tortoise CVS with CollabNet

We recently moved from Sourceforge to CollabNet and had to make changes to our CVS client setup. Sourceforge uses "pserver", whereas Collabnet uses "ext ssh". This is how you can get Tortoise CVS to connect to CollabNet, without prompting you for passwords every time.

1. Create a pair of public/private keys
You can create a pair of keys using PuTTY Key Generator (PUTTYGEN.EXE). Simply press the Generate button and move your mouse to generate randomness. This will create a public key for pasting into an authorized_keys file. Press the Save public key and Save private key buttons to save the keys as files. I have saved mine as:

  • C:\Documents and Settings\[xpid]\ssh\id_dsa (private)
  • C:\Documents and Settings\[xpid]\ssh\id_dsa.pub (public)
Alternatively, you can use the UNIX utility "ssh-keygen", as explained in one of my previous posts here.

2. Store your public key on CollabNet

  • Log onto CollabNet
  • Click on My Workspace
  • Click on Authorization Keys
  • Paste the public key, generated in Step 1, into the Authorized Keys text area and press Update
3. Update Tortoise SSH Settings
  • Open TortoiseCVS Preferences
  • Go to the Tools tab
  • Add your private key to your SSH parameters, so that it becomes:
-i "C:\Documents and Settings\[xpid]\ssh\id_dsa" -l "%u" "%h"
Now, whenever you perform a CVS operation through Tortoise, it will not prompt you for a password.

Your CVSROOT should look something like this:

Tortoise FAQs
CollabNet Help

No comments:

Post a Comment