182Chapter6 • Introduction to CVS
1.
The
-d
command line option
2.
The
CVS/Root
file
3.
The
CVSROOT
environment variable
6.4.2Remote Repositories
As mentioned earlier, there are several methods of accessing a remote CVS server. The
first one we will discuss is the built-in functionality. This method utilizes a network connection
from the developer’s desktop to port 2401/tcp on the server. It requires that all of the intermedi-
ate networking equipment (routers, firewalls, etc.) permit this traffic to pass.
Accessing a repository using the
pserver
method requires additional information when
compared to the local access in order to determine the name of the remote host, the user name to
be used, and the remote connection method.
For example, in order to log into a remote CVS repository, you would need to specify the
following:
# export CVSROOT=:pserver:user@hostname:/usr/local/cvsroot
Where user is your CVS username on the machine hostname. This may be used in the
CVSROOT
variable or on the command line with the
-d
option.
Prior to checking out, committing, importing or performing any other actions against a
CVS server, the user is required to authenticate himself first by issuing a login command. With
the
$CVSROOT
variable set as indicated, type the following:
# cvs login
Logging in to :pserver:user@hostname:2401/usr/local/cvsroot
CVS password:
Type in your CVS password, which will then be stored in a file in your home directory
(
.cvspass
) for future use.
At that point you should be able to check out and commit software from the repository.
6.4.3Checking out a Project
In order to begin work on a project contained in a CVS repository, you must first check the
package out. This brings your working directory up-to-date (creating it if necessary) and creates
a CVS directory in your working directory where CVS keeps information about the project
locally.
To check out a project that is in the repository, simply issue the
cvs
command with the
checkout
option and the name of the project. For example, to check out the Fuzion project
that was imported into the repository earlier, type:
# cvs checkout Fuzion
cvs server: Updating fuzion
U Fuzion/1.0.fuzion.pl
U Fuzion/em.dat