Ok there are already several of these howto's but in all honesty I think they were written by Unix users that have little patients to explain it to windows users. Thus I created this. I'm rather new to source forge and in fact just got this software working myself after spending 4 days at it.
1) Get the software
Sure you could dig up the junk yourself but I got it all organized and already setup... all the software you'll need for CVS, SSH, and SCP. I haven't figured out CVS yet so this this shows you how to get SSH and SCP set up although CVS software is included. Soon as I get CVS figured out I'll add those parts explaining how too!
Contains the following versions:
CVS - 1.10 from http://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip
SSH/SCP - 1.2.14 from http://penti.sit.fi/putty/ssh-1.2.14-win32bin.zip
After downloading from my file just unzip to your windows drive and the following directories will be created
\cvs\bin - where all the software and batch files are at.
\cvs\etc - where the passwd file is at.
\cvs\home - empty but needed
\cvs\home\.ssh - where ssh will store some files that it creates when it runs.
2) Modifying the files you just downloaded.
To simplify things I created a few batch files. They make doing stuff real easy! However in order to work you need to modify the things...
In the /cvs/bin directory there are two batch files, sshlogin.bat (use this to log into the secure shell server) and scpupload.bat (use to upload any files to your shell directory)
How to use them...
for sshlogin.bat just type "sshlogin"and it will use ssh to connect to the shell server. It will ask for a password just type in your password. You will then be connected remotely to the Unix server where you can do any work that may be needed. In reality you'll find that as a windows developer you probably won't use it that much. just to create directories, remove files, etc
for scpupload.bat first go to the directory that the file you want to upload is in. Then type "scpupload filename.bat directoryname/subdir/. If you do not type in the directoryname/subdir/ part then it will get uploaded to the root of your project space. but for example if you wanted to upload a html file to your website type in "scpupload homepage.html htdocs" and then homepage.html will get uploaded to the htdocs dir which is where your website space is located at! If you wanted to upload an image to your image dir inside your website you would type "scpupload image.gif htdocs/images"
sshlogin.bat
@echo off
echo Using SSH to connect to [shellname] SourceForge Shell
ssh -l [username] [shellname].sourceforge.netReplace (including the brackets) "[shellname]" with your shell name (this is usually the name of your project).
Replace (including the brackets) "[username]" with your source forge user name.
scpupload.bat
@echo off
echo Uploading %1 to the following directory
echo [shell directory]/%2
scp %1 [username]@ab-cms.sourceforge.net:[shell directory]/%2Replace (including the brackets) "[shell directory]" with your shell directory (normally in the form of "/home/groups/p/pr/project").
Replace (including the brackets) "[username]" with your source forge user name.
in the cvs/etc directory you will find two files passwd_2k and passwd_9x. If you are using windows 2000 open passwd_2k in notepad and edit the required sections. If you are in windows 9x open passwd_9x in notepad and edit the required values. Then save it as "passwd" without the extra underscore and 2k/9x part. make sure it is just passwd and not passwd.txt. it it does get the .txt part added then manually rename it in explorer and delete the .txt part. otherwise it won't work
3) Set you environment variables.
This is the hardest part in all honesty. I use win2k myself but I believe my explanation for 9x series will work.
In win9x (95, 98, 98se, Me) you need to add the following to your autoexec.bat file... Hopefully you can figure out what modifications need to be made! :)
set CVS_RSH=ssh
set CVSROOT=[username]@cvs.[shellname].sourceforge.net:/cvsroot/[shellname]
set HOME=c:\cvs\home
set HOMEDRIVE=C:
set HOMEPATH=c:\cvs\home
set USERNAME=[username]
set path=%path%;c:\cvs\bin
In win2k you should enter them into the environment variable space.
rightclick on my computer, select properties, select the advanced tab, click on the environment varibles button.
In the system variables section (the bottom section) you should add the following items (use the new button)
Variable Name: | Variable Value: |
CVS_RSH | ssh |
CVSROOT | [username]@cvs.[shellname].sourceforge.net:/cvsroot/[shellname] |
HOME | C:\cvs\home (replace C with the drive you installed the software to) |
HOMEDRIVE | C: |
HOMEPATH | C:\cvs\home |
USERNAME | [username] |
path | add ";C:\cvs\bin" to the end of the path listing |
Well there you go... that should get you all setup. If you need any more help stop by the sourceforge site http://sourceforge.net/docman/?group_id=1
Alan Barber