Overview of CVS
CVS is a source code management tool. In order to retrieve data from a CVS repository, you need a CVS client. The official CVS client is available for most Operating Systems, including Windows, Linux, BSD and Mac OS X. The official CVS client is a text-based command-line tool. Windows users may alternately use the TortoiseCVS instructions client, which is GUI-based.
CVS is a complex tool, designed to be used by software developers. The following resources include command-line examples on how to use CVS:
- SourceForge.net Guide to CVS
- Ximbiot - CVS Wiki.
- Open Source Development with CVS, 3rd Edition
In the following usage examples:
- PROJECTNAME - Replace with the UNIX name of the project.
- MODULENAME - Replace with the name of the module you wish to work with. If you are working with an existing repository, a list of existing modules can be found by using ViewVC. To do so, click on the CVS link under the Code menu item from the project summary page (https://www.sf.net/projects/PROJECTNAME). Then, click on the 'Browse CVS Repository' link. The available module names will be the directories listed on that page. Or access this URL: http://PROJECTNAME.cvs.sourceforge.net/viewvc/PROJECTNAME/
- USERNAME - Replace with your SourceForge.net username.
If prompted for a password, enter the password associated with your SourceForge.net account.
The official CVS client uses a URL to access the CVS repository. SourceForge.net-hosted CVS repositories can be access as Read-Only or Read-Write (requires authentication).
To checkout a Read-Only CVS module:
$ cvs -z3 -d:pserver:anonymous@PROJECTNAME.cvs.sourceforge.net:/cvsroot/PROJECTNAME checkout -P MODULENAME
Read-only access to any project CVS repository may be obtained using anonymous pserver-based authentication. Working copies generated in this manner cannot be used to perform write operations (a fresh checkout via SSH authentication would be necessary). A SourceForge.net user account is not required to access a repository via anonymous pserver.
Remember, the anonymous user has no password associated with the account. Do not enter a password if prompted for one, just hit the enter key to bypass password entry. If you are further prompted for a password, contact SourceForge.net Support for assistance.
You must be an administrator or project member with CVS access permissions to access CVS in this manner. If you are not an administrator or project member with CVS access permissions, you may obtain read-only access to the repository via anonymous pserver authentication. You cannot use the instructions presented in this section. For CVS access permission, have a project administrator grant CVS access for your account.
Read-Write access requires the use of SSH. Users may choose to set up SSH keys prior to checking out a Read-Write CVS module.
To checkout a Read-Write CVS module:
$ export CVS_RSH=ssh $ cvs -z3 -d:ext:USERNAME@PROJECTNAME.cvs.sourceforge.net:/cvsroot/PROJECTNAME checkout MODULENAME
The first time you try connecting to the cvs.sourceforge.net host, you should see a message similar to the following:
The authenticity of host 'cvs.sourceforge.net (126.96.36.199)' can't be established. DSA key fingerprint is dc:a3:df:84:00:c6:65:b4:93:a6:2e:22:b1:d1:91:b8. Are you sure you want to continue connecting (yes/no)?
Before typing 'yes' to accept the host fingerprint, ensure the fingerprint is correct for the host. You can find a listing of SSH host keys in the SSH Host Key Fingerprints list. If you receive a host key warning, please contact the SourceForge.net team.
Configuring CVS Around a Firewall
Many users are behind firewalls or proxy servers which block traffic on the TCP ports normally used to access CVS servers (22 for SSH authentication). We provide SSH access to our CVS servers using port 443 (normally SSL-encrypted HTTP web traffic), to eliminate some of the problems users encounter.
In some cases, proxies or firewalls modify the packets sent on this port as well, which is not something that can be overcome. For these cases, or if port 2401 is being blocked for pserver access, contact your network administrator or ISP for further assistance.
These instructions should be followed only if you know you are behind a firewall or proxy which is blocking outbound traffic on port 22.
For developer access to repositories via SSH, from behind a firewall or proxy:
This requires a modification of the OpenSSH configuration. If you want this modification to apply to all accounts on the system, you must modify the global ssh_config file (typically /etc/ssh/ssh_config). If you want the modification to only apply to your user on the system, you should modify the user's SSH config file (typically ~/.ssh/config). After you decide which file to modify, add the following 2 lines to the file (replace PROJECTNAME with the project UNIX name you are trying to access):
Host PROJECTNAME.cvs.sourceforge.net Port 443
If the standard service ports (TCP 22 for SSH, TCP 2401 for pserver) do not function properly due to a firewall or proxy, and the above workaround also does not work properly, please contact your network administrator or ISP for further assistance.