For all operating systems, you will need:
(if not using Windows, skip to Step 3)
./ssh-keyinstall -s cvs-server.yourdomain.com -u your-cvs-usernameand type the passwords/passphrases as required. When it's all finished, assuming no errors, you should be able to log in to the cvs server and type only your pass _phrase_ (not password) to complete the login. If you are asked for the cvs server's password, something didn't work.
. do-cvs-setupas opposed to the more common:
./do-cvs-setupso that the variables defined within the script will be accessible to the shell after the script ends.
Example shell script:
#!/bin/bash # do-cvs-setup -- Shell script to set up the environment for CVS. # April 9, 2002 by mbates # First export CVSROOT and CVS_RSH locally so your local machine knows about # the remote server AND knows to use SSH for the communication between your # CVS client and the server. export CVSROOT=":ext:email@example.com:/repository" export CVS_RSH="ssh" # Now alias ssh-add to automatically add your key when it runs. Here, it is # assumed that you created a DSA-type key -- if you used RSA or whatever # instead, then specify the appropriate filename here. alias ssh-add='ssh-add $HOME/.ssh/id_dsa' # Now crank up the agent and add key (note the backticks, not single quotes) eval `ssh-agent -s` ssh-add # Now it will ask for your passphrase.CAVEAT: Beware of bad linefeeds if you copy this shell script between Windows and Linux! If it generates lots of errors when you run it, try converting the linefeeds, or re-type the script into a new document.
GUI for Mac users (optional):
The Developer Tools package that ships with Mac OS X includes Apple's Project Builder development environment, as well as command-line CVS available via the Terminal application. In addition, Sente Software makes a free, open-source program called Concurrent Versions Librarian (see References section for URL), which is a GUI for CVS (akin to gCVS on Linux), and which also interfaces nicely with Project Builder. (Project Builder includes a CVS GUI of its own, called SCM, but I use CVL instead due to personal preference.)
Download and install CVL (Concurrent Versions Librarian) from http://www.sente.ch/software/cvl/. Add the following line to the bottom of the do-cvs-setup shell script shown above (assumes that you installed CVL into the Applications folder):
open /Applications/CVL.appCVL then gets to use ssh-agent to connect to the remote server (anything launched from this particular Terminal window will be able to use ssh-agent for an SSH login prompt). The rest of the process is normal CVS with a nice GUI and if you double-click a project file from the file list, it will open in Project Builder, which provides the usual niceties of a good development environment (syntax highlighting etc.).
Alternate Mac OS X GUI: You can also open Project Builder from this environment, and then use its version control system, but the quirks of SCM are not documented here.
open /Developer/Applications/Project Builder.app
Assuming your project is in a directory called "YourProject," run the following commands:
cd YourProject cvs import -m "initial import" YourProject your-cvs-username v0_1The last two fields are vendor and release tags, respectively.
cvs checkout YourProjectFor subsequent checkouts, DON'T remove your local copy first.
To check in modifications on existing files:
cvs commitIt is recommended to run cvs update before committing changes.
To add a new file to the repository:
cvs add newFile cvs commitTo add a new BINARY file to the repository:
cvs add -kb newBinaryFile cvs commitTo remove an existing file from the repository:
rm existingFile cvs remove existingFile cvs commitTo receive changes from the latest commits from your co-developers:
cvs updateIf another developer has made major changes like new directories, do:
cvs update -dTo stamp files with a release tag for each release:
cvs tag -R "v001" cvs commitTo check this release out:
cvs checkout -r "v001" YourProject