Today I went ahead and tried to get back to a project started some time ago, but something was not right. I weren’t able to update or commit anything to my SVN server. I spent a frustrating hour trying to resolve the problem, but finally I managed to find what went wrong. Here’s my troubleshooting process:
The problem: Visual Studio cannot connect to my server via SSH – commits and updates fail after authentication.
- Q: Does providing right/wrong authentication change anything?
A: No, no visible change in (weird) behavior.
- Q: Does TortoiseSVN have the same problem?
A: Yes, it’s commits and updates do not work. It’s not Visual Studio’s problem.
- Q: Does it work on another repo on this server?
A: No, it does not. It’s not this single repo problem then.
- Q: Does it work for another server without SSH auth?
A: Yes, checked repo for Processing. It’s not general TortoiseSVN problem. It’s either server or local Tortoise config issue.
- Q: Does it work on another computer?
A: Yes, checked my home box, works there. It seems to be my laptop’s problem.
- Q: Does substituting TortoisePlink for Plink do anything?
A: No effect.
It seems that (Tortoise)Plink fails to connect, but Tortoise doesn’t report the error properly.
- Q: Does Plink connect to the server when run from command-line, not Tortoise?
I run cmd.exe, go to plink.exe location and type “plink mysvnserver.example.com”.
A: No, it returns an error: “bash: mysvnserver.example.com: command not found” I have no idea what this means.
- Q: Does it work for another server?
A: No, it prints:
>plink anotherserver.example.com
login as: myusername
myusername@mysvnserver.example.com’s password:
What the…? I tried to login to anotherserver, but was logged to mysvnserver.
Then I figured out that PuTTY settings might be interfering with proper plink operations. It seems that when you overwrite the default settings, every PuTTY app uses them. So, plink didn’t require host name (it was specified in the Default Settings), it treated the supplied host name as a command, therefore failing. I have reset the putty settings, now everything runs just fine.
I hope this helps, and next time when you get “connection closed unexpectedly” from TortoiseSVN, you’ll know where to look.