views:

225

answers:

2

I have a subversion server on my local network and access it using the 192.168.1.x address. The problem is that when I leave my house and need to update svn on my laptop, I now have to use an external address. I've been using the svn relocate command to switch between external and internal addresses, but this is cumbersome. Does anyone have a clever trick around this issue? I use TortoiseSVN as my client.

A DNS entry on my router would probably work so I could use the external name all the time, but unfortunately my router it isn't that flexible.

+3  A: 

You can add a record to your hosts file, and then change that instead of relocating.

BTW, what's wrong with always using external name? (besides unnessesary traffic)

Eugene
If you are behind a NAT and mapped the SVN server as a virtual host, external name probably won't work.
Mehrdad Afshari
I've never been able to get that to work. Trying to use my external address from inside my network always fails. I am behind NAT. IIRC it fails because the router doesn't know what to do with the external address on a LAN->LAN connection.
sinoth
That sounds like a router misconfiguration. It should be possible with a modern router to use your external address from inside the LAN.
Ether
+1  A: 

I always use my external address, and have a bash script that sets up the ssh tunnels I want to get to my repositories. Was svn, now git, but the same principal applies.

Don Branson