views:

730

answers:

8

I have set up a version control system using TortoiseSVN at my home to manage my pet projects, school projects etc...and it works locally.

Now I need to be able to access my code repository remotely, like from school, so that I will be able to update the source at school from the repository, and commit it again once I have finished working on it.

The question is, how can I connect to my repository remotely ? What ports do I need to open on my router for example?

Also, I cannot install the Tortoise client at school, so I will need some other portable application that does this task, be it GUI or CLI.

+8  A: 

There are various approaches to offer remote access. In your case, the simplest thing might be to set up an svnserve server. You can either manually start it with --daemon, or install it as a Windows service. In either case, port 3690 must be open. Make sure to set up a password, and to restrict svnserve to the directory where your repository lives.

As a portable application, I recommend to use the command line svn client. Various command line clients exist for Windows. You should install one of them on your machine, make sure you understand how to use it, and then copy it along with all DLLs that it needs onto an USB stick.

Martin v. Löwis
iAn
+1  A: 

Martin is right: it needs to run as a daemon or a registered service. On my machine I use the command svnserve -d in order to start it.

Check out the official SVN book, it has lots of info too:

http://svnbook.red-bean.com/en/1.5/svn-book.html

barfoon
+1  A: 

I'd recommend to go with some hosting provider who offers hosted SVN, for example Dreamhost. Much easier than configuring and maintaining it on your own.

+3  A: 

I'd recommend visual svn server to get set up and running quickly.

DShook
This is a very cool product. I also recommend it.
garykindel
+1  A: 

You can use RapidSVN on a memory stick as a graphical SVN client. The download is an installer, but after you've installed it, you can copy the contents of the program files folder to a memory stick and just run it from there.

Jim T
+1  A: 

I'd caution you to go over your home network's defenses if this is the first "external service" you've offered. Opening a hole in your firewall can be pretty painless, if you're an old hand, but is something you'll you'll want to approach with caution if you've not done it before. Do your reading. :-)

Alternatively, there are free code-project-management sites online (both SourceForge and Google Code spring to mind) which offer Subversion hosting. Some services even allow you to provide an svndump to preserve your existing repository (I believe that Google Code, at least, allowed this by special request at one point but I do not know if that is still possible).

One potential downside to these two is that their repositories are publicly viewable. If you'd like to restrict read access to your repository, there are other free services which allow that but I'm afraid I can't name any off the top of my head.

Ben Blank
Assembla.com offers free private hosting for students.
nickf
+2  A: 

Since people have answers your question specifically - an alternative solution: a distributed version control system.

Git is probably the most popular, but I would recommend trying darcs - as it is compiled into a ~portable single binary file, unlike git which is a mess of shell-scripts, perl scripts/libraries and C (or C++?) binaries.

The inherent benefit to a "DVCS" is you can commit (and do pretty much everything else) without connecting to a central server - when you are at school, you can commit, make/merge branches and so on. Then when you are at home you "push" to your main repository.

This means there's no need to open up ports through your router, and you don't have to depend on your home computer/internet-connection always being up.

Another alternate solution would be to use a 3rd-party SVN server (for example Google Code, or one of the many hundreds others - some allow private repositories, others charge for these), and again you don't have to worry about port-forwarding and so on.

The question is, how can I connect to my repository remotely ? What ports do I need to open on my router for example?

You can serve SVN via a web-server like Apache (guide) - then you would only have to forward port 80, and it is generally allowed on all networks.

dbr
+1  A: 

I have svn server at home over ADSL line with dynamic IP. My setup that enables me remote access:

  • setup subversion server as windows service
  • open port 3690 at server firewall.
  • open port 3690 at router firewall.
  • configure port forwarding on ADSL router
  • setup DNS for home server at www.dyndns.og
  • setup SVN security (authorization and authentication)
zendar