MacCVS On SourceForge
This is a description of how to go about doing development on SourceForge
using MacCVS.
SourceForge uses secure shell for communicating with clients. This presents
some um special challenges for Macintosh development. Fortunately, there
are currently two mechanisms for doing this:
Using MacSSH.
MacSSH is an open source SSH client
for the Macintosh. You will need version 2.1a9 or later of MacSSH and version
3.1.11 or later of MacCVS.
Let's say you work on PROJECT as USER with PASSWORD.
- Launch MacSSH
- Choose Favorites/Edit Favorites...
- Click "New" to create a new group of settings for the project.
- Under the "General" tab, enter the following:
- Alias: something like "PROJECT Development"
- Host Name: cvs.PROJECT.sourceforge.net
- Port: 22
- Under the "Security" tab, enter the following (note the quotation
marks under "Command:"):
- Protocol: ssh2 (Secure Shell)
- Username: USER
- Password: PASSWORD
- Command: -N -E"cvs -d /cvsroot/PROJECT server"
- Under the "SSH2" tab, enter the following:
- Method: CVS Port forward
- Port:514
- Click OK (to save the new settings).
- Click OK (to close the Favorites list).
- Choose Favorites/PROJECT Development
- Accept the host key.
- Now, launch MacCVS
- Choose CVS Admin/Preferences...
- Under the "General" tab, enter the following:
- CvsRoot: USER@127.0.0.1:/cvsroot/PROJECT
- Authentication: RHosts
- Click OK.
You should now be able to start work on SourceForge. To check out a copy
of your project:
- In MacCVS, choose CVS Admin/Checkout module...
- Choose the folder to save the workspace tree in.
- Under the 'General" tab, enter the following:
- Module: PROJECT
- Click OK.
MacCVS should now start checking out your module.
If the MacSSH tunnel gets closed for some reason (if MacSSH is shut down
or cvs accidentally closes it) just choose your configuration from the Favorites
menu as in step 9 above.
Using a Linux proxy.
This method requires a Linux box, and may open you to security holes
as it uses rsh, but as long as your private network is secure and you use
a machine behind a firewall, this should not be a problem.
Let's say you work on PROJECT as USER with PASSWORD and you log in to
the proxy machine as PROXYUSER and your file sharing setup has you as MACUSER.
Here are the steps to setting this up:
- Choose a Linux box to use as a proxy. This should
preferably not be visible to the outside world.
- Open a telnet or ssh session
on the proxy machine from your Macintosh, logging in as PROXYUSER.
- Make sure ssh and cvs are installed
on the proxy box:
- Type which cvs
- Type which ssh
- Create a key using ssh-keygen (if you
don't already have one), and don't give it a password. Store it in ~/.ssh/identity
(i.e. in your home directory)
- Upload the contents of ~/.ssh/identity.pub
(the text file) to SourceForge:
- Copy the ~/.ssh/identity.pub from your
telnet application the clipboard
- Go to your account
page.
- Click on "Edit
Keys" at the bottom
- Paste the key in, and remove any carriage returns.
- Click "Update"
- You may now have to wait several hours for your
key to become active.
- Create a file ~/.ssh/config and replace PROJECT and USER strings with your values.
This basically creates an ssh alias called PROJECT that uses the blowfish
cipher and talks to the correct SourceForge server.
- Create a script called "cvsproxy" on the remote
box in /usr/bin and make it world executable (chmod +x cvsproxy).
This proxy takes its arguments and passes the first one to ssh as the host
alias and the rest to cvs.
- Add your Mac's hostname and MACUSER
to your ~/.rhosts file
- Add a line machost.example.com MACUSER
- You may want to use the machine's IP address
if it has no name.
- You may wish to leave off the login to avoid
problems with the File Sharing id.
- Make sure that your .rhosts file has the correct
permissions: -rw-r--r--
- Turn on rsh. Under Linux, this consists
of the following steps:
- Edit /etc/inetd.conf to include or uncomment
a line looking like this:
shell stream tcp nowait root /usr/sbin/tcpd in.rshd
- Restart the internet daemon. One of the following
incantations should work:
- Go to /etc/rc.d/init.d and type: ./inet
restart
- OR, as root, type kill -HUP inetd
- Set up MacCVS to connect via rsh.
- Launch MacCVS
- Choose CVS Admin/Preferences...
- In the "General" panel, enter the following:
- Authentication: "Rsh"
- CVSROOT:
- In the "Ports" panel, enter the following:
- Check "Check for an alternate server name"
- Alternate server: cvsproxy PROJECT
- Click OK
This tells MacCVS to call cvsproxy on the proxy machine with the
arguments PROJECT and whatever other arguments would have been
passed to cvs. cvsproxy just turns around and executes
ssh PROJECT cvs with whatever arguments would have been passed
to cvs. rsh handles the flow of the data from there, and
it all Just Works.
This page is maintained by Richard
Wesley. Many thanks to Jean-Pierre Stierlin for the MacSSH fixes and
directions and to Chris Nandor for the Linux proxy.