Registered user access using Linux


Following are the steps necessary to access the TOL-Project CVS using a registered user. The reason for a different document from anonymous access is because the two methods are different. A registered user does CVS commits while an anonymous user has only read access.

1. Key generation

The first step you need to take is to create your public and private keys under the directory ~/.ssh/. For security reasons, the private key you create must not ever leave that directory. The public key must be sent to 'devel' at 'tol-project.org'.
To generate this keys you have to use the ssh-keygen tool:

cd $HOME/.ssh/
ssh-keygen -t dsa

You will be asked for the key name. Enter id_dsa. The next question will be a passphrase you will use when you open a new session before using the CVS. Always use a long phrase, with several words, because it will be used to encrypt the real password through the session.

Once you have generated the files id_dsa and id_dsa.pub, that contain the private and public keys respectively, send the file id_dsa.pub to
'devel' at 'tol-project.org'.

2. CVS_RSH and CVSROOT enviroment variables

You now need to create the CVS_RSH environment variable to the correct path of the ssh executable, usually /usr/bin/ssh. Read your shell manual page to have this value correctly and permanently installed in your shell(.profile, .bashrc, etc.)

The CVSROOT environment variable contains the path to the code repository. If it is not found, you will have to specify it through the command line.

Sample .bashrc:

export CVS_RSH=/usr/bin/ssh
export CVSROOT=:ext:userid@cvs.tol-project.org:/home/cvsroot/tolp

Where userid is the name of the registered user you will use to access the CVS.

You are ready to access the CVS with read-write permissions!

3. Automatizing ssh sessions using ssh-agent and ssh-add

Once you have done every described step, and the Tol Development Team has sent you an OK email, you are ready to use the CVS, but every cvs command you type in will ask you for the passphrase. To avoid this, you can use the tools ssh-agent and ssh-add.

Let's give it a try:

eval `ssh-agent`
ssh-add

You will then be asked for the passphrase. From that moment on, you can access the CVS repository without having to enter the passphrase after every cvs command you enter. The agent will send it for you:

If you have defined the CVSROOT environment variable:

cvs co toldoc

If you have NOT defined the CVSROOT environment variable:

cvs -d :ext:userid@cvs.tol-project.org:/home/cvsroot/tolp co toldoc

4. Passphrase inside the X environment.

If you are using an X Desktop, you may like to have the session ready for the whole environment, instead of just a shell. You can configure your window manager to ask you for the passphrase in every X startup.

For the KDE window manager (If you use any other Window manager, like gnome, windowmaker, Icewm, fvwm, etc, read your documentation on how to achieve this), you can simply add a shell script in the ~/.kde/Autostart directory containing:

#!/bin/sh
/usr/bin/ssh-add

Next time you enter a KDE session you will be asked for the passphrase:

x11-ssh-askpass.png

Now you can download every TOL-Project from the CVS repository. Take a look at the "Small CVS User Guide" document. This is necessary for you to learn the commit and all project-related issues.

You can also take a look at the excelent CVS documentation in the Ximbiot CVS Manual.