Fix Invalid Port Number Error with TortoiseSVN and PuTTY
I just wasted an hour on this, so I hope that explaining the solution here will help someone. If you’re using TortoiseSVN and PuTTY, perhaps using a private key created with PuTTYgen (like me), then this probably applies to you. I’m using Windows XP Pro, but Home is probably the same. I didn’t have this problem before because I just used cygwin’s ssh.exe which worked fine.
PuTTY Internal Error
Invalid Port Number
For TortoiseSVN’s SSH cilent, leave the box blank. Do not choose putty.exe, that doesn’t work. Blank is fine, TortoisePlink is fine. Otherwise you see the error above. When you enter the URL to the repository, use the PuTTY saved session name instead of the server name. For example, if your session is MyConnection, use MyConnection for the server instead of, for example, svn.osafoundation.org.
Totally saved me hours of frustration. Thanks much!
Still helping people, thanks.
It works, but how does Tortoise know where Putty is?
It doesn’t need to. It uses TortoisePLink, which reads putty registry.
This doesn’t work for me. I’m special ;)
I was trying to port forward through a firewall to the svn server. The firewall was accepting from a port like 11111 and remapping to 22, forwarded to svn. I was using tcpdump to monitor everything. The putty saved session logs in fine. However, I get the usual ‘invalid port’ when trying tortoise, so I tried this suggestion of using tortoiseplink. The port error goes away, but as the session is trying to authenticate, it keeps prompting me for a password. The dialog that pops up prompts me to enter a password for user ‘svn@myfirewall’, NOT ‘svn@mysvnserver’, so I suspect that its not handling the fact that its getting forwarded by the firewall. ie. using the wrong login creds.
Tcpdump shows that the authentication IS actually trying to work on the svn server behind the firewall, it just fails….again, just tortoise being daft. Putty works fine.
I have a solution which I think will work (put an authenticator on the public side), but was wondering if anyone else was trying the same thing as I had here.
actually it is working….sort of. If I type in my password for the account, it prompts me a few times (probaby for each svn command its issuing) and the server accepts it. The auth log on the svn server shows that its accepting the passwords, and I eventually get the repository data.
So now the issue is – why doesn’t tortoiseplink use my session key ? It never attempts it, there’s no attempt in the auth log.
more if I fix it.
^@#%^$%#!
OK, it appears tortoiseplink is busted. It cannot use putty profiles made by putty, probably a version issue. Tortoiseplink is just a rebuilt plink to stop those annoying plink cmd shell popups, but issuing tortoiseplink and plink commands in a dos shell proves that plink is happy, tortoiseplink isn’t
ok, last time I talk to myself honest.
A workaround is to use pageant. Works fine, no popup crud.
Thanks! You saved me some time — I just wish I had checked Google 20 minutes ago :P
thanks a lot… that saved me!!!
Hey thank u very much that helps my a lot! U solve that solved my problem preffectly.
Thanks a lot! Leaving it blank it solved my problem. In my case, it doesn’t work writting a PUTTY’s saved session name, but doesn’t matter because TortoisePlink is fine.
Same here – it solved my problem and I’m not using TortoisePlink or anything else.
Thanks a lot!
I almost gave up on this.
It turned out to be so easy! ;-)
Thanks!!! Saved me a lot of time! :)
THANK YOU!!
Thank you :)
We spent more than an hour trying to figure out why the heck were we getting this message!!!!
Sorry this solution does not work on windows 7 64bit
Saved me too
Excellent, took me ages to find this – thank you.
I also had problems with the repository URL when using svn+ssh:// for anyone with the same issue you enter it as you would navigating from the root directory eg:
svn+ssh://your.server.com/var/subversion/youRepositoryName
When prompted for a username and password enter your SSH credentials.
Wow, still so usefull 5 years after the message !
Haha mate, I was Googling for something at work and came upon this, what a coincidence.
Great!
Thank you very much. A lot of time spent before I find this simple but unexpected solution. 6 years and your post is still helping people.
Didn’t save me hours, but did at least provide a solution at the end of those hours. It’ll save my teammates hours, I guess. :) Thanks!
Thanks mate!
Thanks a lot, that should be the first post when you type “tortoisesvn port forwarding issues” or “tortoisesvn routing policies”. HTH for seo :)
thank you very much
Great! Thanks alot!