Using SourceForge CVS and setting up SSH

A forum to store posts deemed exceptionally wise and useful
Post Reply
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Using SourceForge CVS and setting up SSH

Post by saigumi »

Ok, this isn't Irrlicht specific. But it may help you out. These instructions are Windows-centric, but any Linux user worth their salt should be able to translate it to Linux-ese.

Index
Part 1 - Using as a User
Part 2 - Using as a Developer

Using as a User

First, download CVS. (http://www.cvshome.org/)
Unzip it and add it to your path. If you are using Windows, you can copy cvs.exe to c:\windows\system32. The only file you do need is cvs.exe.

To pull the latest source from a project:
Step 1: Open a command Window. (Start->Run, then enter cmd.exe)
Step 2: Create a directory where you want the files to go. (mkdir directoryname)
Step 3: Go into that directory. (cd directoryname)
Step 4: Log into CVS. When asked for a password, just hit Enter.
Enter the below line, replacing {projectname} with the name of the project:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/{projectname} login
Step 5: Start the pull. Enter the below line, repacing the project name, and then the module name.
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/{projectname} co {modulename}

The files will be copied to the directory.

As a user, you are not able to put files back into CVS. That's a job for...

Using as a Developer
First, you need to set up SSH, an encryted security system. SourceForge's guide is really out of date and doesn't quite work.

This page will be the guide, and I will note out important parts. You need to follow every step exactly, except downloading 7-zip and other parts that I will point out.

http://sourceforge.net/docman/display_d ... group_id=1

Follow the guide up to "Installing the PuTTY SSH suite". This part is very important. When it says to connect to "cvs.sourceforge.net", you may not receive the same results in step 12 about a home directory being made. If it says something like "Nothing to do here, logging out." Then everything is still good.

Skip the WinCVS step for now, you'll have plenty of time later.

The second critical step is "Generating a SSH key pair". Some older guides say to use SSH1. They are wrong. Click "SSH2 DSA", then "Generate".

Be sure to SAVE THAT PRIVATE KEY somewhere safe, if you delete or lose it. You will have to follow the frustrating next step again...

"Uploading your SSH public key" aggrivates me to no end. Copy the Public key from the Puttygen textbox. Then log into SourceForge and go to your account settings. Towards the bottom is a "Update Public Key" button. Click it. Paste your key in and save.

Wait 6 hours. (The guide says 20 minutes... yeah.. on a good day back when this guide was made. I've had it take overnight to propigate the first time I made mine.)

Frustrating? Huh? Yeah.. you need to wait, hoping and praying that you did it right.

May as well set up Pageant while we wait, following the directions on the page work.

Also, now would be a good time to install WinCVS or whatever CVS GUI client you want to use. If your a manly man, straight CVS is fun.

Well....

We got time....

So, um... how's the family?

(a few hours later)

Now is the moment of truth, do that "Testing automated authentication" thing. If it asks for your password, it's not working. Either you didn't wait long enough, you didn't add your key to pageant, or some mysterious void ate your key.

If you didn't see a request for a password. Congrats.

BACK UP YOUR PRIVATE KEY FILE. Put it on a disk, burn it on a CD, just don't lose it.
Crud, how do I do this again?
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Here are some helpful things if you cant connect using your key (as a developer, and using Putty and WinCVS):

1) DO NOT create a profile in Putty.exe-- if you do, than when you (or WinCVS) calls plink.exe to connect to cvs.sourceforge.net, it will use those settings.

2) make sure the CVS key you created is SSH1 type

3) i was having problems doing the 'plink.exe' console test. They say to run "plink username@cvs.sourceforge.net echo "blah" " to test out your key. (If the key works, it wont ask for your password when it connects)

I suggest using the '-v' command parameter to see whats really going on. Also, you may find its tryiing to use a SSH2 key in some versions. In that case, use the '-1' parameter to make sure it uses SSH1. If you have to do this, and it works (ie: it prints out 'blah' and it doesnt ask for your password), then you still wont be able to get WinCVS working-- because it doesnt send '-1' to plink when it performs its actions.

Instead, what you'll have to do is take advantage of that #1 warning I gave to you: Create a profile for connecting to cvs.sourceforge.net in putty.exe

make sure its set to use ONLY SSH1, and you might try checking the 'allow agent forwarding' check box, and choosing your .ppk in the 'private key file for authentication' input box.
a screen cap is worth 0x100000 DWORDS
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Hmm, I'm trying to use WinCVS but the version I can't find where to set the ssh program. Where do you do that?
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Sorry. I don't use WinCVS. When I wrote the guide a long time back, WinCVS was in between versions. One was incompatible and the new version was broke.

I use TortiseCVS (http://www.tortisecvs.org).
Crud, how do I do this again?
Post Reply