“TortoisePlink has stopped working”: Vista, TortoiseCVS, ext and ssh
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
Another workaround I found for the problem was to set TortoisePlink.exe compatibility mode to Windows XP SP2. I am using Vista Home Premium 64-bit with UAC disabled and McAfee security center.
Comment by Ibrahim Khan — April 13, 2009 @ 5:46 am
Hi,
The disabling UAC and setting compatibility moded didn’t help for me and I can’t upload the private key to the host.
My TortoisePlink was then working in about 1 try out of 20.
Finally I have find a way which made it work for me. I use putty plink.exe instead of TortoisePlink.exe and supply it with password from “command line”.
In TortoiseCVS/Preferences/Tools set the following
SSH Application : /plink.exe
SSH Parameters : -l “%u” -pw “%h”
Well, not the safest way to store password … but ok for me at the moment.
Comment by Pavel — May 29, 2009 @ 6:35 pm
In my previous comment some of the text is hidden. Here is it, fixed :
SSH Application : path_to_putty/plink.exe
SSH Parameters : -l “%u” -pw your_password “%h”
/P
Comment by Pavel — May 29, 2009 @ 11:40 pm
Thanks. Your guide is very helpful. I had summarized your guide, and put them in step-by-step screen shoot format.
http://yccheok.blogspot.com/2009/07/configure-tortoisecvs-to-access.html
Hope this may help others as well.
Comment by Yan Cheng Cheok — July 5, 2009 @ 7:11 pm
A simple solution for those who have TortoiseSVN as well as TortoiseCVS: Use the version of TortoisePlink.exe in C:\Program Files\TortoiseSVN\bin. TortoiseSVN uses a different (probably newer) version that doesn’t crash. You don’t have to mess with keys or anything.
Comment by psigen — July 21, 2009 @ 10:21 pm
I tried psigen’s suggestion (on Windows 7 Starter), and it worked like a charm.
Thanks for the blog entry and the comments, all. Saved me a lot of time and hair-pulling-out.
–
Adam
Comment by Adam Cameron — November 29, 2009 @ 9:50 pm
I found that by switching from Secure Shell (:ext:) to Secure Shell (:ssh:) I was able to circumvent the TortoisePlink problem as well. It is good to see the variety of workarounds!
Comment by Greg L — December 22, 2009 @ 6:18 pm
An updated version of TortoisePlink.exe can be found in TortoiseSVN installation path, and you don’t have this issue anymore with it.
Just copy it to the TortoiseCVS installation path!
Comment by Yann Papouin — June 11, 2010 @ 12:58 pm