If you are trying to get TortoiseCVS working on Windows Vista, but keep getting the error “TortoisePlink has stopped working”, read on.
On Monday I took delivery of a shiny new Dell Inspiron 1510 and so far I’m really pleased with it. I opted for the standard install of Vista Home Premium SP1, with some trepidation as there are a lot of stories about how awful it is. I’m fairly new to Vista; my first contact with it was when I changed jobs two months ago and at the end of my first week was presented with a new laptop with Vista Pro installed.
But despite the horror stories I’ve read elsewhere, I’m pretty happy. However, I did encounter one problem which was, for me, a show-stopper. I couldn’t get CVS to work. I’ve been using CVS for quite a few years now, and have a large library of software in a CVS repository on an ageing Dell SC420 running Fedora Core 4 (yes, I know, I should really upgrade - but it works, so why fix it)?
My old box is an XP pro machine, and I use TortoiseCVS as a client for convenience, so naturally the first thing I did on Monday evening was install TortoiseCVS and see if I could get some kind of connection. Obviously I ignored the warning from the installer that Tortoise might not work on Vista, as it has been working quite happily at work on my Vista Pro box.
I realised I might have a few tries, but the first thing I tried was to enter the following in the CVSROOT, and try to connect:
:ext:dereks@crowe:/home/dereks/cvsroot
(crowe is the hostname of the Fedora box, and dereks is the CVS user)
I expected one of two things to happen:
- Failure to connect at all
- A password request to appear, followed by failed authentication as it’s been so long since I logged on to that box manually, I wasn’t sure I remembered the password.
What actually happened was a popup from Windows which said: “TortoisePlink has stopped working”.
Ok, off to Google. It appears other have had the same problem, and have found solutions in a number of ways: turning off Vista’s UAC (User Access Control), disabling various protocols on the network connection, uninstalling McAfee (why does everyone seem to hate McAfee?), turning off anything remotely resembling a firewall, and so on. And believe me, I tried them all. And every time I tried to connect using ext I got the same error: “TortoisePlink has stopped working”.
I’d installed PuTTY and could connect using it via SSH, so I was fairly happy that SSH was possible, but I was having no success at all with TortoiseCVS, and all down to something wrong with TortoisePlink, or Vista’s interaction with it.
One post I found seemed to indicate that the problem was with Vista’s handling of the way that TortoisePlink was restarting CVS (I must admit I didn’t understand the details, as although I’m a good applications programmer, and have some experience with systems work, much of the discussion seemed to require knowledge of Windows internals which I don’t have) but the situation seemed quite hopeless; it seems that once you’ve got this problem, it stays.
Ok, so let’s use a different client. After all, if Tortoise is broken on Vista, perhaps there are other clients which aren’t? WinCVS, sadly, fared little better; and I even read reports of the same issue with various SVN clients, again intractable, and I was beginning to wonder if I’d end up shelling out for XP Pro - which I do feel would be a backward step as over the past couple of months I’ve got to quite like Vista; plus I wanted to be able to test the software I write on Vista as well as XP and without a Vista box that’s quite difficult.
Without much hope of success, I pretended I had got everything working, and carried on setting up the environment to use TortoiseCVS in the most streamlined way possible. This basically involves creating a public private key pair, and using the keys to connect via SSH automatically. So the steps I took were:
- On the vista box, create a private/public key pair using PuTTYgen (part of the PuTTY suite).
- Add the private key to Pageant.
- Set up a session in PuTTY, using that private key. Save the session, I used the name “dereks-crowe”.
- On crowe, add the PUBLIC key to ~/dereks/.ssh/authorized_keys2
- In TortoiseCVS, replace dereks@crowe in the CVSROOT with the name of the PuTTY sessionsaved in step 3.
So my CVSROOT is now:
:ext:dereks-crowe:/home/dereks/cvsroot
And, Hey! Presto! It worked. TortoiseCVS now connects correctly, with no need for a password.
The final thing was to make sure this was really the fix. I stopped Pageant (right click on the icon in the system tray and choose exit) and try to connect again. Result: “TortoisePlink has stopped working”. Restart Pageant but don’t add the private key: “TortoisePlink has stopped working”. Add the key to Pageant: success.
It’s early days, but I reckon I’ve fixed the problem.
Note: To get Pageant to automatically load the private key on startup, add the path to the private key file to Pageants command line. If you add this to the startup menu as a shortcut, it should start automatically. My startup shortcut reads:
“C:\Program Files\PuTTY\pageant.exe” “c:\program files\putty\dereks-crowe.ppk”
So what are you waiting for. If you are having this or a similar problem, go and download PuTTY, PuTTYgen and Pageant and give it a whirl. It might not work, but if it does it’s a lot better than disabling your virus scanner, firewall, UAC, networking extras, and all the other Vista-goodness you paid good money for. And please let me know how it works out.
Derek