Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to use Project Builder's CVS over SSH with SourceForge' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to use Project Builder's CVS over SSH with SourceForge
Authored by: carsten on Jan 04, '02 08:19:03PM

This is awesome! This means it is possible to use Project Builder with SourceForge.net, which requires CVS access via SSH (Project Builder defaults to RSH). So I wrote up some modified instructions to set up Project Builder for use with SourceForge:

How to use Project Builder with SourceForge (Mac OS X)

Project Builder 1.1.1 (December 2001 Dev Tools) can be used with SourceForge's CVS but a little work is needed to get it set up the first time. The following instructions were based on a tip from macosxhints.com.

Preparation

Make sure that your ssh keys have been uploaded to your account at SourceForge and that you can sucessfully ssh into your account. Next, ensure that you can check out your project from SourceForge using the unix command-line based CVS tools provided by Mac OS X.

Instructions

1. Download and install "keychain" from:
http://www.gentoo.org/projects/keychain.html

The Keychain script acts as a front-end to ssh-agent, allowing you to easily have one long-running ssh-agent process per system, rather than per login session. This dramatically reduces the number of times you need to enter your passphrase, from once per new terminal window session to once every time your local machine is rebooted. It also allows you to use Project Builder with SSH instead of RSH. SSH is required if you want to commit files to a CVS repository at SourceForge.

2. If you use the default tcsh shell or csh, add the following to your .cshrc file:

<code>
setenv CVS_RSH 'ssh'
# Keychain is an OpenSSH key manager
# This will add my SSH1 and SSH2 key
/usr/bin/keychain ~/.ssh/id_rsa ~/.ssh/id_dsa
source ~/.ssh-agent-csh-${HOST}
# Alias to servers via SSH
alias sshsf 'ssh mysfuserid@phpwiki.sourceforge.net'
</code>

If you use bash instead, add following to the .bashrc file:

<code>
CVS_RSH=ssh; EXPORT CVS_RSH
# Keychain is an OpenSSH key manager
# This will add my SSH1 and SSH2 key
/usr/bin/keychain ~/.ssh/id_rsa ~/.ssh/id_dsa
source ~/.ssh-agent-${HOSTNAME}
alias sshsf='ssh mysfuserid@phpwiki.sourceforge.net'
</code>

3. Close the terminal window then open a new one. Keychain will activate ssh-agent which will ask for your ssh key password. It keeps running in the background and won't ask for your password again until you log out or restart.

4. From now on, <strong>YOU MUST open Project Builder from the Terminal shell for it's CVS to work with SSH</strong>. This is why we created a command alias in .cshrc to launch Project Builder. If it is already running because you double-clicked the PB icon, quit it, then launch it from the terminal by typing pb. <em>Once PB is running you can safely double-click a project file to open it</em>.

Using the above method, ProjectBuilder will successfully connect to the Sourceforge CVS with SSH. Any other server which requires cvs connections to be made cia ssh instead of rsh should now work too.

If you have a ".cvsrc" file in your home directory, remove any configuration line which enable CVS compression. SSH usually already has compression enabled, so an extra layer of compression just slows down the whole CVS process when Project Builder is used over SSH. (At least it did for me at SourceForge, with cable modem and G4 DP-450).

Example contents of my ".cvsrc" file:
diff -u3
cvs -z6 <--remove this line
update -d

Note: Renaming /usr/bin/rsh to something else and replacing it with ssh doesn't seem to work; Project Builder simply MUST be launched from the command line for it to work at all with ssh.

Hopefully Project Builder's integrated CVS will be improved in the future to directly support SSH. Send an email to: macosx-tools-
feedback@group.apple.com to let the team know that full support for SSH in Project Builder is important.



[ Reply to This | # ]