Thursday, November 6, 2008

svn+ssh setup at home

Finally I seemed to have managed to set up my SVN server to be accessible over the internet using ssh. And I owe it all to the excellent (and simplistic) notes found here.
And I didn't have to open any ports other than the already open SSH port.
Well Istarted off wanting to do it with http, but then thought hey, why open another port, let's get it working with the ssh stuff only. I had tried it once before using these formal instructions but didn't get very far.
Update
I've had trouble getting ssh with keys to work on the home dell box. Turns out it was an incorrect permission setting on the .ssh & key files. Anyways, thanks to this site I traced it out and set the permission to 600 for all the files and to 700 for the directory. Now I can try all the cool stuff I've been dying to try...

Update 2017-Mar-04
Once again, due to system failures and my normal SVN server's desktop refusing to start up I w as forced to migrate my SVN setup to another machine. I imagined it to be a daunting task. but it was surprisingly simple.

I setup the new server on the Samung N150+ netbook. Not ideal, but sufficient for my needs considering I'm patient and cheap. :-)

I've listed the steps below:

  1. Ensure svn is installed on the new system.
    1. Since my netbook was running fedora 24 I had to issue the following command "dnf install svn". Of course, since I'd installed it before there wasn't much more to be done.
  2. Ensure OpenSSH is installed.
    1. The command "dnf install openssh" confirmed that I had it installed.
  3. Ensure SSH is started at boot time.
    1. The command "systemctl enable sshd.service" took care of this requirement.
  4. Next I copied over the repository from the system that refused to start.
    1. Since my old system refused to start, I un-plugged the HDD containing my SVN repository and took it out of the system.
    2. Fortunately it was a SATA drive.
    3. So I took the Seagate external HDD that I had and removed the adapter from it.
    4. Next I plugged the internal HDD into the adapter and voila, I was able to access this drive using the USB.
    5. Then copying the repository across was a piece of cake.
  5. Finally, I created a sym-link to the repository using the command "ln -s /path/to/actual/svn/directory /repository"
  6. I was able to validate access to the repository with the command "svn svn+ssh://localhost/repository list". And I got my repository listed out.
During the time it took to copy the almost 60GB repository across (to another external USB HDD) I was able to update this blog post and still had time to spare.