Use SSH with ProjectBuilder's SCM feature

Nov 12, '01 01:26:05PM

Contributed by: smeger

This document describes how to set up CVS using SSH on a client computer and using Project Builder's SCM feature for version management. It assumes that CVS and SSH are already set up on the server that you will be checking your code out from. It is desirable to use SSH because CVS transmits usernames and passwords in clear text otherwise.

If you'd like the how-to, read the rest of the article...

Setting up CVS on Mac OS X using the bash shell

  1. Set your .bashrc file to know about the CVS server by adding the following lines to ~/.bashrc on the client machine.
    export CVSROOT=:ext:username@remotehost:remote_path_to_cvsroot
    export CVS_RSH=ssh
  2. Set up your ssh key using ssh2
    ssh-keygen -t dsa
    (accept the default file and enter a passphrase)

  3. Physically transfer the file ~/.ssh/id_dsa.pub to the CVS server and add it to the contents of ~/.ssh/authorized_keys2.

  4. Set your .bashrc file to start up the ssh-agent so that you won't need to type a passphrase to access the CVS server. Add the following line to ~/.bashrc on the client machine:
    alias ssh-add='ssh-add $HOME/.ssh/id_dsa'
To get a CVS directory from the server
Open a new Terminal window and type the following (path is the path to the project you wish to get from the CVS server):
eval `ssh-agent -s`
ssh-add [ then enter passphrase ]
cvs checkout path
To use SCM from within Project Builder
Project Builder needs to be able to access the ssh-agent that was started in your terminal session above, so you must launch Project Builder from the terminal and keep the terminal window open during your Project Builder session. From the terminal, type:
open /Developer/Applications/Project Builder.app
If you are beginning from a fresh terminal session, you will need to do the following:
eval `ssh-agent -s`
ssh-add
open /Developer/Applications/Project Builder.app
Caveats and Gotchas(c) 2001, All Rights Reserved, Jason Harris

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011112132605357