Contents / Previous / Next


Accessing a Remote Repository via a Network

A repository might be on the local computer, or it might be on a computer across the room or across the world.

To distinguish various ways to access a repository, the repository name can start with an "access method".


Local

The access method `:local:' means to access a repository directory.
Example: `:local:/cvsroot' means that the repository is in `/cvsroot' on the computer running CVS.

If the access method is omitted and if the repository does not contain `:', then `:local:' is assumed.

Under Windows your local repository may be `c:\src\cvsroot', then you must specify the access method, as in `:local:c:\src\cvsroot'.


Remote Repositories

Your working copy of the sources can be on a different machine than the repository.
Using CVS in this manner is known as "client/server" operation.
You run CVS on a machine which can mount your working directory, known as the "client", and tell it to communicate to a machine which can mount the repository, known as the "server".

Generally, using a remote repository is just like using a local one, except that the format of the repository name is:

 :METHOD:[[USER][:PASSWORD]@]HOSTNAME[:[PORT]]/path/to/repository
Specifying a password in the repository name is not recommended during checkout, since this will cause CVS to store a cleartext copy of the password in each created directory. `cvs login' first instead.


Using the client with password authentication:
To run a CVS command on a remote repository via the password-authenticating server, one specifies the `pserver' protocol, optional username, repository host, an optional port number, and path to the repository.

 cvs -d :pserver:gnu.org:/cvsroot checkout someproj

CVS uses the contents of the CVS_SERVER variable to determine the name of the CVS server command (if this variable is not set then `cvs' is used). Example:

 CVSROOT=:pserver:bach@gnu.org:2401/cvsroot
 cvs checkout someproj


Connecting with rsh or ssh:

CVS uses the rsh of ssh protocol to access a remote repository.

CVS uses the contents of the CVS_RSH variable to determine the name of the remote shell command to use when starting a CVS server. If this variable is not set then `rsh' is used. To use ssh set:

 shell> export CVS_RSH=ssh

Example: Supposing you want to access the module `foo' in the repository `/cvsroot/', on machine `gnu.org':

 cvs -d :ext:bach@gnu.org/cvsroot checkout foo
The `bach@' can be omitted if the username is the same on both the local and remote hosts.