|Version 9 (modified by jhaverlack, 5 years ago)|
PLEASE NOTE: As of 2009-01-28, the SourceForge.net team is completing the last three draft site docs. This is one of those three. Please excuse any incomplete content; we'll have this finished out soon.
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.
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).
Configuring CVS for Anonymous pserver Authentication
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.
The following settings should be configured to use CVS with pserver authentication:
- Protocol: :pserver:
- Server: PROJECTNAME.cvs.sourceforge.net (PROJECTNAME is the UNIX name of the project).
- Repository folder: /cvsroot/PROJECTNAME (PROJECTNAME is the UNIX name of the project).
- User name: anonymous
- Password: There is no password, simply hit the Enter key to denote an empty password to be used.
- Module: Enter 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 ViewCVS. To do so, click on the 'CVS' link 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.
Usage examples are provided later.
These configuration settings are the only settings needed in order to access a repository for read operations (checkout, update). 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.
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):
Then, when you run your CVS command, modify the hostname, cvs.sourceforge.net to cvs-ssh.sourceforge.net. For example:
$ export CVS_RSH=ssh $ cvs -d:ext:USERNAME@PROJECTNAME.cvs.sourceforge.net:/cvsroot/PROJECTNAME checkout MODULENAME
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.
A list of supported CVS clients and configuration information is provided in the Features section of this page. The following configuration settings are used to access a SourceForge.net-hosted CVS repository with a CVS client:
- Hostname: PROJECTNAME.cvs.sourceforge.net (PROJECTNAME is the project's UNIX name)
- Port: 2401 (anonymous :pserver: authentication) or 22 (developer :ext: authentication via SSH)
- Protocol: :pserver: for anonymous CVS, or :ext: for developers (with SSH for external authentication; export CVS_RSH=ssh)
- Repository Path: /cvsroot/PROJECTNAME (PROJECTNAME is the project's UNIX name)
- Username: 'anonymous' for anonymous CVS access or your SourceForge.net username for developer CVS access.
- Password: There is no password for anonymous CVS access (just hit the enter key when prompted for one). You must generate a SSH key for developer authentication.
Firewalls and proxy servers may present a problem in using CVS. Workaround may be possible using this alternate configuration for developer (but not anonymous) access; contact your ISP or network administrator for assistance if you are having issues with anonymous or developer access and these workarounds do not function for your environment:
- Hostname: PROJECTNAME.cvs.sourceforge.net (PROJECTNAME is the project's UNIX name)
- Port: 443
Configuring CVS for Developer SSH Authentication
These are the settings to be used when connecting to the CVS server as a developer for read/write access. 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.
Before configuring CVS, configure an SSH key for authentication to the CVS server.
The following settings should be configured to use CVS with SSH authentication:
- Protocol: :ext:
- Server: PROJECTNAME.cvs.sourceforge.net (PROJECTNAME is your project's UNIX name)
- Repository folder: /cvsroot/PROJECTNAME (PROJECTNAME is your project's UNIX name)
- User name: Your SourceForge.net username (the same one you use to login to the SourceForge.net website).
- Module: 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 ViewCVS. To do so, click on the 'CVS' link 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.
A CVS command consists of a few basic parts:
cvs [cvs-options] command [command-options-and-arguments]
For the purposes of using CVS with SourceForge.net, you need to know the following values for each of those options:
- CVS options: -z3 -d:ext:USERNAME@PROJECTNAME.cvs.sourceforge.net:/cvsroot/PROJECTNAME (where USERNAME is your SourceForge.net username and PROJECTNAME is the UNIX name of the project)
- CVS command (most typically used ones): checkout, checkin, import, add, update
- CVS command options: These are specific to each command, refer to the CVS manual for specific details. Example commands are provided for each operation later.
Before attempting a CVS operation using :ext: based authentication, you must define the external authentication mechanism. To do this, run the following command (if you forget to run it, CVS will not work):
$ export CVS_RSH=ssh
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 (18.104.22.168)' can't be established. DSA key fingerprint is 02:ab:7c:aa:49:ed:0b:a8:50:13:10:c2:3e:92:0f:42. 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.
If you are asked for a password, you did not properly configure SSH key authentication. SSH key authentication must be configured before CVS access via SSH will function properly.