CVS over SSH
CVS
CVS (Concurrent Versions System) is a common means of providing version control for files on a file system. In particular, it can be used to keep track of changes made to source code files by different developers. CVS clients are available for all major operating systems.On a local filesystem, CVS is particularly easy to use. One must merely create a "cvsroot" directory and create a project directory inside. Then just set the CVSROOT environment variable to the absolute path of the newly created CVS root directory in order to be able to use standard CVS commands such as co (checkout), ci (commit), etc. Note that it is also possible to specify the CVS root directory on the commandline using the -d flag.
For example, to checkout a project:
cvs -d /full/path/to/cvsroot co projectname
CVS over SSH
CVS also has the ability to specify a CVSROOT on a remote filesystem. This is done by specifying that the CVS root directory must be accessed through an external connection. In order to make that external connection, you must also specify the username and machine to be used to create the external connection.For example, to checkout a project on a remote filesystem:
cvs -d :ext:username@remotemachine:/full/path/to/cvsroot co projectname
By default, CVS uses rsh (remote shell) to establish external connections. However, due to the lack of security when communication over rsh, most people actually specify that CVS should communicate over ssh (secure shell) instead. In order to use CVS over a remote connection to the CS department, one must use ssh -- rsh connections are not allowed.
One specifies that CVS should use ssh instead of rsh by setting the CVS_RSH environment variable to be "ssh."
In tcsh:
setenv CVS_RSH ssh
In bash:
export CVS_RSH=ssh
If you plan on using this functionality often, you should most likely incorporate the above line into either your .cshrc file or your .bashrc, depending on what shell you typically use.
Other than specifying the CVSROOT diretory as external, remote CVS over SSH works exactly as local CVS. The only difference is that files are copied and commands are run over the secure external connection behind the scenes.
Note that currently the CS department requires that all connections over ssh be made through the ssh gateway machine named, appropriately, ssh.cs.brown.edu. Thus to use CVS over SSH to connect to a CVS root directory on the departmental filer, one has specify the ssh gateway as the machine name.
For example, to check out a project on the departmental filer:
cvs -d :ext:username@ssh.cs.brown.edu:/full/path/to/cvsroot co projectname
If for some reason your CVS root directory is not on the departmental filer but is instead on a specific machine within the department, you should refer to the section entitled Preferred Operation of the ssh.cs.brown.edu documentation in order to connect to that particular machine by default.
| Page Owner: Tstaff Account | Last Modified: Mon Jun 30 07:20:51 2008 |