without offering a shell access. Here is a quick recipe that uses:
The instructions below assume a unix like operating system.
set path=(/bin /usr/bin /bin ) # not totally necessary
umask 022
The disadvantage of using one user ("projectcvs") is that the author in the logs is always the same. One way around is to set up as many users as necessary on the server and grant them access to the CVS repository using group permissions.
Add each ssh public key in $HOME/.ssh/authorized_keys on one line with the following model.
command="/path/to/cvs server",no-port-forwarding,no-pty,no-X11-forwarding,no-agent-forwarding ssh-rsa AAAA<...>jQaqs= foo@bar
(see 'man sshd', section 'AUTHORIZED_KEYS FILE FORMAT')
The above line grants access for the user having the associated private key.
The only usable command is "/path/to/cvs server", which provides a reasonably
good safety level.
The cvs option --allow-root=/path/to/cvsrepo is not be honored with the ":ext:" access method and, therefore cannot be used (unless patching cvs on the server, see http://ioctl.org/unix/cvs/server).
Logged as a different user whose public key has been entered as above, the access is done using:
env CVS_RSH=ssh cvs -d:ext:projectcvs@host.xx.yy.zz:/path/to/cvs_directory checkout .
The "-d" option can be omitted once a snapshot is obtained as cvs will find the relevant information stored in the local directory CVS. However, CVS_RSH must still be set.
Starting cvs 1.12.11 on the client side, one can use a new syntax, a welcome addition to avoid forgetting setting CVS_RSH. I did not try it though.
env CVS_RSH=ssh cvs -d:ext;CVS_RSH=/path/to/ssh:projectcvs@host.xx.yy.zz:/path/to/cvs_directory checkout .
Information about using CVS is available at http://www.cvshome.org. The cvs manual is available at http://www.cvshome.org/docs/manual/.
Some particularly useful commands are:
$Id: CVSserver.html,v 1.5 2005/01/14 12:12:56 arnaud Exp $
by Arnaud Desitter.