Monday, November 12, 2012

Installing a Git Server

I am starting a new development and so I wanted to try out (this new, hot sccs) Git. Unfortunately I am based on Windows rather than Unix so this is not quite as simple as it should be.
There is a good background on the options for a git server in the Git documentation.  if you want to secure updates the option seems to be ssh.  On windows there are several installs of openssh but it is not integral to the OS.  there are a couple of pages that provide support/suggestions here and here. Ultimately I gave up with this, the final issue that confounded me was that git on windows comes with some cygwin components and so does openssh.  The mapping of file paths in these two installs is different which caused some issues that I couldn't totally resolve.
My second attempt was to install git in a Ubuntu virtual machine.  I have not had any experience with Ubuntu so I was a little nervous but it seemed like there would be less friction that way.  As it turned out almost everything went very smoothly.  I created the virtual machine using the free vmware vmplayer (5.0). I downloaded the Ubuntu server 12.4 ISO. Vmplayer recognized the OS and did the install using its easy install.  Once the install completed I installed git and openssl server using apt-get.  I created a directory for my repositories and a user for myself.  I initialized a repository using:
Git init --base <dir>
The final gotcha was when I tried to clone the repository from the Windows git ui.  It was generating an error that turned out to be caused by the repository being empty. Once I committed a file ( through git on the server) everthing work fine.
I am not totally happy with my repository being 'hidden' in a virtual disk but otherwise this is a great solution for me.

0 Comments:

Post a Comment

<< Home