tags:

views:

92

answers:

1

So we used to use port 22 for our svn repository, but port 22 was recently closed by the firewall administrator, which forced us to use a different port.

Anyway, it seems like Xcode doesn't play very well with custom port numbers, because as soon as you change the port number to anything, even 22, you get the following error message:

Error: 210002 (Network connection closed unexpectedly) Description: (null)

That seems to be the error message you get as soon as something isn't working, which isn't very helpful.

Setting the port makes the URL look like this:

svn+ssh//user@host:22/path

I tried connecting to ssh from the command line using:

shh user@host:22

and got the following error message:

ssh: Could not resolve hostname host:22: nodename nor servname provided, or not known

However, if I connect using:

shh user@host -p 22

It works.

This makes me believe that ssh doesn't parse user@host:22 correctly.

Does anyone know how I can change the URL to make it work in Xcode?

If anyone knows how to change the url to make it work with ssh, that could be helpful too.

Thanks!

+1  A: 

What you need to do to change the port of svn over ssh is to add a custom scheme. This is how you do it

Add the line:

ssh2222 = /usr/bin/ssh -p 2222

to the file ~/.subversion/config in the [tunnels] section.

Then use a URL that looks like this:

svn+ssh2222//user@host/path

You can name your scheme whatever you want and your port number does of course not have to be 2222.

Erik B