Using CVS on UNIX and Mac Systems
Once you have a CVS client installed on your local system, you can check out code and check it back into your project repository. Kenai supports only SSH-based access. For full instructions on using CVS, see http://ximbiot.com/cvs/manual/.
Using SSH With Command-Line CVS
- Before using SSH with Project Kenai, you have to generate an SSH key pair and save the public key to the SSH Keys tab in your user profile. For more information on generating SSH keys, see Generating an SSH Key.
- By default, CVS attempts to use the BSD remote shell protocol to operate on remote repositories. To enable the use of SSH instead, set the environment variable CVS_RSH to ssh:
> CVS_RSH=ssh ; export CVS_RSH
- To check out the source code for a project, you need to know the name of the project and the name of the source repository. For example, for a project named bluebird with a repository named cvs, the CVSROOT for SSH access to the repository would look like this:
- Change directories to the location on your local machine where the repository will be checked out. For example:
- Check out the server repository into a new directory.
> cvs -d:ext:"your-username"@java.net/cvs/bluebird~cvs co .
- Copy a file to the local directory and then add it in cvs.
> cp helloworld.java ~/bluebird-cvs
> cd ~/bluebird-cvs
> cvs add helloworld.java
You should see the following acknowledgment, which means that the file has been added and is ready to be checked in:
cvs add: scheduling file `helloworld.java' for addition
cvs add: use 'cvs commit' to add this file permanently
- Update your local working copy (in case someone has checked files in while you were working):
> cvs update
- Check the file into your project repository on the server:
> cvs commit -m "First commit to bluebird repository" helloworld.java
- When the system accepts your entries, you see the following responses for the initial helloworld.java checkin:
RCS file: /cvs/clownjuice~cvs-repo/helloworld.java,v
Checking in helloworld.java;
/cvs/clownjuice~cvs-repo/helloworld.java,v <-- helloworld.java
initial revision: 1.1