Personal tools
You are here: Home cm Wiki Setting Up for CMISS CVS Access
Views
Setting Up for CMISS CVS Access copied.
FrontPage >>

Setting Up for CMISS CVS Access

last edited 2 years ago by blackett

The CMISS CVS repository is on cvs.bioeng.auckland.ac.nz and so this is the CVS server machine.

You need to be a member of the cmiss group as indicated by the Institute's LDAP server in order to access the repository. (You can check this with the groups command on cvs.bioeng.auckland.ac.nz.)

It is convenient to set up a nickname for the CVS server so that the configuration can be changed easily should be server move or the access method change.

Edit the file ~/.ssh/config so that it contains the following:

  Host cmiss-cvs
    # Use this line if this machine is inside the University
    # or has vpn access to the University:
    Hostname cvs.bioeng.auckland.ac.nz
    # Comment out the above line and uncomment these lines when using port
    # forwarding to access cvs.bioeng.auckland.ac.nz from outside the University:
  #   Hostname localhost
  #   Port 8888
  #   HostKeyAlias cvs.bioeng.auckland.ac.nz
    # Edit and uncomment this if your login name for machines in the institute
    # differs from that for this machine:
  #   User user001

To tell cvs the location of the repository when checking out files, the option -d cmiss-cvs:/cvs/cmiss can be used when invoking cvs to check out files. If you only use one repository, then it is often more convenient to instead set the environment variable CVSROOT to cmiss-cvs:/cvs/cmiss. (More information is available in the node "Specifying a repository" in the Cederqvist manual also available via info cvs. On Linux, man 7 environ provides more information on environment variables.)

Access to the CVS server machine is through ssh and so the environment variable CVS_RSH must be set to ssh to inform cvs to use this command (unless cvs was configured to use ssh by default).

(fsh may be used instead of ssh if it is available on the client machine and in.fshd is one of the directories in the environment variable PATH on cvs.bioeng.auckland.ac.nz.)

From a tcsh (see output from echo $0), for example:

  setenv CVSROOT cmiss-cvs:/cvs/cmiss
  setenv CVS_RSH ssh

or from bash, ksh, or zsh:

  export CVSROOT=cmiss-cvs:/cvs/cmiss
  export CVS_RSH=ssh

You may want to do this in your shell startup file.

The CMISS CVS server machine is only directly accessible from inside the University of Auckland. If you are inside the University or have VPN access then you are ready to start using cvs commands; otherwise see section "Outside Access" below.

When running cvs commands, a connection with the CVS server machine will be established through ssh and authentication is through the Institute's Kerberos server so you may be prompted for your password on the Kerberos server.

The A Day With CVS section from "Open Source Development with CVS" covers most CVS commands in a step-wise manner.

Outside Access via Port Forwarding

You can access the CMISS CVS server (or any machine inside the University) from outside the University by using another ssh connection to forward a local port through a visible gateway machine to the ssh port on the CMISS CVS server (or other machine). bioeng10 is a suitable gateway machine.

To do this, edit the cmiss-cvs section that you added to ~/.ssh/config as indicated in its comments for port forwarding and add the following section:

  Host bioeng-tunnel
    Hostname bioeng10.bioeng.auckland.ac.nz
    LocalForward 8888 cvs.bioeng.auckland.ac.nz:22
    # Edit and uncomment if required:
  #   User user001

The nickname bioeng-tunnel refers to an ssh connection that forwards the necessary ports. (8888 is chosen at random. You could try any port number over 1024 provided the same port is used in the cmiss-cvs config.) This must be started before and running while any cvs commands are issued.

Start the tunnel with:

  ssh -N bioeng-tunnel

You may wish to add the -f option to background the tunnel process after login, or use ^Z and bg, or remove the -N option to have a shell on bioeng10 in the foreground and issue local commands from another terminal. (You can bundle the ssh options with version 3.1p1 or later.)

While this connection is active you can access the CVS server machine, and in fact anyone on your machine can use your tunnel to access sshd on the server.

You are now ready to use cvs in (almost) the same way as if you were inside the University.