# Projectlocker, Cygwin And Git On Windows

I’ve been using subversion for the past few years.  Recently I have been using ProjectLocker as well. ProjectLocker is a web-based service that offers subversion, trac and git.  Using subversion has been wonderful.  The only drawback for me is when I can’t access ProjectLocker.  When that happens, I’m not able to commit changes until the next time I have access to the server.  So I decided to learn how to use git.  At least I can still commit my changes as often as I want to even when offline.  Then I can push all those changes when I have access to ProjectLocker again.  Since I’m using Windows XP again, I decided to go the route of using cygwin.

First, download and install cygwin.  I had to install it little by little. Meaning install the base system first. Once that’s done, run the setup file again and install a needed module. Repeat the cycle for each module needed until you have everything you need.  I needed SSH (to connect to ProjectLocker), svn (for my old projects that are still on subversion), git and vim.  The reason I install it piece by piece is because not all the mirror servers have the needed modules.  The last thing I need is to wait 2 hours and be 5% away from a complete installation only to find out that the mirror was incomplete.

Next, run cygwin and mount the folders you need to access from within that.  Cygwin can’t see the windows folders.  It’s like it’s in its own inner world.  So to access the files which I’ll be needing to sync with ProjectLocker, I’ll need to mount the required folders.  This is where I found myself short of banging my head against the keyboard.  After doing a normal mount of my needed folders, I found myself staring at error after error when I ran git later on.  For some reason, it doesn’t want to sync with the server.  After much research I found out that it was because a normal mount would result in the folder being read as text.  To make it work nicely, I needed a binary mount.  The easiest way to do this is to edit /etc/fstab and enter the following:

d:/repo_folder /home/Owner/repo_folder fat32 binary,posix=0,user 0 0


If your windows system uses NTFS instead of FAT32, change it accordingly.  It’s much better to mention your mounted folders in the fstab file rather than go through the hassle of manually running mount every time you restart cygwin.

Once you’ve declared all the folders that need to be mounted, create an ssh public key.

ssh-keygen


This should generate a file (/home/Owner/.ssh/id_rsa.pub) that holds your public key.  Open that file, copy the contents and paste them into ProjectLocker.  Test the ssh connection to see if it works.

Now you can start using git.