CVS-SSH

CVS over ssh HOWTO

NOTE: This document assumes the user knows the basics of cvs with remote repositories. The examples that follow assume that a cvs repository already exists in a Columbia Computer Science NFS share somewhere. This document assumes the workstation you are using is a *nix box with cvs and ssh installed.

Using ssh as the communication medium for cvs provides security advantages over using pserver and/or rsh. Here’s a quick example on how to use this mechanism.

If:

  • your username is joe
  • the existing cvs repository is at /home/joe/CVSROOT/
  • the project name is my_project

Then on the remote machine,

  1. Set the environment variabe CVS_RSH to ssh (make sure ssh is in your path. You may wish to do this in your login scripts):
    sh/bash
    CVS_RSH=”ssh”; export CVS_RSH
    csh
    setenv CVS_RSH “ssh”
  2. Use :ext:joe@compute.cs.columbia.edu:/home/joe/CVSROOT as the repository location for all cvs commands. This can be done by:
    • Set the environment variable CVSROOT or
    • Use the global option -d.

Example

To checkout the project my_project, type cvs -d :ext:joe@compute.cs.columbia.edu:/home/joe/CVSROOT checkout my_project. You will be prompted for joe’s password. To avoid being prompted for the password with each CVS command, you may wish to use ssh-agent.


Links

CVS book is a free online book on CVS. 2nd Edition Chapter 2 has the relevant information.

ssh-agent shows how to use ssh-agent cache your passphrase.