home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


  Previous section   Next section

8.1 Specifying Repository Paths

Whenever CVS runs a command from a client, it needs to know where to find the CVS repository. The address of the repository is called the repository path. CVS looks for repository paths in the sandbox, the CVSROOT environment variable, and the -d repository_path command option.

If you run a CVS command from within a sandbox, CVS uses the repository path that is stored in the sandbox. When a sandbox is not available — such as when you're creating a sandbox or issuing a command from outside a sandbox — you must specify which repository you are attempting to access. You also need to specify the repository path if you are in a sandbox but wish to access a different repository than the one the sandbox uses.

You can specify a repository path from the command line with the -d repository_path option, or you can specify it with the CVSROOT environment variable. CVS uses the path given with the -d option in preference to the path in the sandbox, and it uses either the sandbox or the -d path in preference to the path in the environment variable.

The rtag, rlog, rdiff, rannotate, and export commands can run without a sandbox. If these commands are run outside a sandbox, they need either the -d option or the CVSROOT environment variable.

The format for a repository path is:

[:method:][[[user][:password]@]hostname[:[port]]]/path

The method can be one of the following:

local

For the local machine.

ext

For externally defined rsh or rsh-like connection methods (such as SSH).

fork

For connecting to a local machine as if it were a remote machine (useful if you are trying to diagnose problems).

server

For the internal rsh server, available only on some operating systems (including Windows).

gserver

For connections through the GSS-API (currently Kerberos 5.0).

kserver

For connections through Kerberos 4 and earlier.

pserver

For the pserver (built-in password server) connection method.

Everything except the path itself can be left out of a repository path definition.

If the method is left out, and the host is not included or is the local host, CVS uses the local access method. If the method is left out but the host is included, CVS uses either the server or the ext methods, depending on whether an internal rsh server is available. If user is left out, CVS uses the username in the current environment. If password is left out and required, CVS asks for it. If the port is left out and the method requires a port, CVS uses the default port for that method. (The default port for each access method is given in the following sections on each method.) If the host is left out, localhost is assumed.

If you put a colon immediately after the username, CVS attempts to connect with an empty password.

If an element of the repository path is included but not needed for the current method, CVS displays a message stating which element is not necessary.


  Previous section   Next section
Top