CVS with SSH on Windows
Written for
- Tortoise CVS - 1.8.11
- PuTTY,PageAnt,PuttyGen,PLink - 0.56
- WinCVS 1.3.20.3 Beta 20 (build 3)
Find out if you are going to be using Tortoise or WinCVS as your CVS client. Then pick the instructions for that client. Some of the steps are the same for both clients, so instead of typing them twice, I just reference which steps to use in that particular clients setup overview.
Tortoise CVS Client Setup Overview
- Download Tortoise CVS.
- Run the installer
- Setup SSH (Steps 1-5 below)
- Configure CVSROOT (Step 7 Below)
- Checkout Module (Step 7 Below)
- Download WinCVS.
- Run the installer
- Install CVSNT (this is an install option when installing WinCVS)
- Setup SSH (Steps 1-6 Below)
- Configure CVSROOT (Step 8. Below)
- Checkout Module (Step 9. Below)
1. SSH Setup Overview
- Download PuTTY,PageAnt,PuttyGen,PLink from the PuTTY web page.
- Generate Keys
- Configure PuTTY
- Configure PageAnt
2. Generate SSH Keys and install Public Key on Server.
- Open up PuttGen.
- Select SSH2 RSA and 1024 Bit
- Click on Generate Key button and move mouse around.
- Type in a password twice.
- Hit save public and save private key buttons. Save to a local drive.
- Copy the Public key from the top of the PuttyGen app window.
- Open a SSH connection to the server you want to connect to.
- Goto your home directory
- cd into .ssh (if it doesn't exist create it 'mkdir ~/.ssh')
- open authorized_keys2 file (if it doesn't exist create it 'touch ~/.ssh/authorized_keys2' )
- edit the authorized_keys2 file and paste the public key from puttygen into the file. (copy everything)
- Save authorized_keys2
3. Setup Putty to use private key to connect to server.
- Open PuTTY
- Enter HostName or IP address for server.
- select SSH
- Enter saved session name.
- Select the connection menu from the menu on the left..
- Enter username for the server in auth-login username.
- select SSH->Auth from the menu on the left.
- Browse to the private key
- click on session on the menu on the left.
- Hit save button.
(You need to do this everytime you want to use PuTTY without a password. If you logout you will need to do this next time you login. Once you logout PageAnt gets reset.)
- Open PageAnt (a new icon should apear in your system tray next to the clock)
- Right click on icon and select add key, and browse to private key
- enter the password you selected during key generation.
- hit OK.
- Open up session you created above.
- It should connect with no issues. If there is an issue you did something wrong. Go back and check all settings above.
- Right click on my computer and select properties.
- Find the enviornmental variables button and hit it.
- Add CVS_RSH as a system variable
- Name: CVS_RSH
- value: (path to plink.exe) (i.e. 'c:\putty\plink.exe')
- Hit OK,OK,OK.
- Create a project directory
- open up project directory in windows explorer
- right click and select 'cvs checkout'
- configure CVSROOT
- protocal = 'secure shell (:ssh:)'
- server= servername.domainname
- port = (blank)
- repository folder = (where cvs is installed on the server)
(i.e. /usr/local/cvs) - username = username for the server where cvs is installed
- module = name of module you want to checkout
- hit ok
- It should checkout all files into your project directory.
- Goto the Admin Menu and select Login
- Click on '...' next to CVSROOT at the bottom of the window.
- CVSROOT menu will pop-up
- Protocal: Select ssh
- Repository path : enter the path where the cvs repository is on the cvs server (i.e. /usr/local/cvs)
- Click on username and hit the edit button.
- Enter your username
- Click on hostname and hit the edit button.
- Enter the hostname or ip of the cvs server.
- click on private key and hit the edit button
- enter the path to your private key.
- ** Notice password,port and version are left empty
- pageant saves the password so we don't need it here. If you are not going to use private keys then you can enter it.
- port - we are using ssh so the default ssh port will be used, if you are using ssh on a non-standard port, you should put it here.
- version - not sure what this is, so we are leaving it blank.
- Hit the OK button, it should bring you back to the login screen.
- Hit OK to login.
- It should log you in correctly, if not go back and check your settings.
9. Check out Module with WinCVS
- Go to the 'Remote' menu and select 'checkout module'
- try to check out your module.
- if it works then it is setup correctly.
Ken Cochrane
03-05-2005
0 Comments:
Post a Comment
<< Home