Swinburne CVS and SSH Setup

From SwinBrain

This guide outlines how to setup access to your CVS repository on the Faculty of Information and Communication Technologies Mercury server.

This is a How To article designed to give step-by-step instructions. Search SwinBrain and the external links if you require more detailed information about this topic.

Contents

Using CVS over SSH

SSH is a secure transport layer which can be used to communicate with a server such as mercury.it.swin.edu.au. CVS can operate in a client-server configuration. The server is run on demand by the client and they communicate using their own protocol. This protocol can operate over a number of different transports. The transport to use can be encoded in the CVSROOT and CVS_HOME environment variables. The recommended transport is SSH and the recommend ssh client for use under windows is PuTTY’s plink.exe. Before using cvs over ssh, you should set up plink to use the putty key agent.

The plink.exe client is able to use ssh key files for authentication. Using these will allow you to login to the server using the key file, rather than a password, for authentication. The following steps will guide you through the creation and registration of this key file. Follow the SSH instructions for setting up the PuTTY client and the plink program.

Getting Started with WinCVS

Once you have setup SSH you can access your CVS respository on mercury. To do this you will need to install a CVS client on your machine (the lab machines already have this installed). You can use any CVS client, we recommend WinCVS for Windows.

Installing WinCVS

Setting the Environment variable
  • Download and install the CVSNT client, get the free Open Source version
    • Only install the client tools, you dont need to install the server
  • Download and install WinCVS
  • Add a CVS_RSH environment variable
    • This is needed to tell cvs to use plink to connect to the server
    • Locate your MyComputer icon, right click and select properties.
    • Switch to the Advanced tab and click Environment Variables
    • To your user add a new environment variable called CVS_RSH set its value to c:\apps\putty\plink.exe
    • Click ok to close all dialogs
  • Run WinCVS

Checkout an existing project

To checkout an existing project you will need to do the following in WinCVS. This assumes that your cvs repository is setup in a cvs directory.

  • From the Remote menu select Checkout Module
  • In the module name enter the name of the project
  • Set folder to checkout to to something like c:\working
  • Enter your CVSROOT as one of the following. Replace username with your user name.
    • For your own repository use :ext:username@mercury.it.swin.edu.au:path to home/cvs
      • You can find your path to home using the following commands when logged into the server (mercury)
      • cd
      • pwd
    • For HIT2302 subject repository use :ext:username@mercury.it.swin.edu.au:/home/students/subjects/hit2302/cvs
    • For HIT2302 project assignment repository use :ext:username@mercury.it.swin.edu.au:/home/students/accounts/hit2302_ teamid /cvs replace teamid with your team id (01..99). Someone in your team will need to create this.

Adding a project to the repository

To add a project to the repository you need to do the following. This assumes that your cvs repository is setup in a cvs directory.

  • Select the directory you want to import
    • We suggest that you create a new directory for your project in c:\temp
    • To this directory add a new text file called readme.txt in which you should outline the project
    • Import this directory into CVS then delete it
  • From the Remote menu select Import Module
  • Click ok on the import filter
  • The repository path should be set to the project name. If not check that you have the right directory selected.
  • Enter your CVS root (see above)
  • Enter a description
  • Click OK

Once the project is imported use the checkout process to fetch it into your working directory. You can then add any existing files by selecting them and then choosing the Add option from the Modify menu or by pressing the add button on the toolbar. Remember to checkin to send the files to the server.

Creating your own repository

To create your own process you will need to use the cvs init command on the server.

  • Login to the server using PuTTY
  • Locate the directory where you want to create the cvs repository
  • Get the full path to the directory (pwd will give you the path to the current directory)
  • Assuming that you want to install the cvs at /myhome/cvs then...
  • Type cvs -d /myhome/cvs init

Check that that directory now has a CVSROOT subdirectory, then you can start using it as your repository.

Links

[edit]Links: Topic Brains
Return to Swin Brain