Git Server Up in 5

| Comments

Well, so you support a bunch of users that code either as a group or as individuals but you, the guy who manages the servers, are not offering them any service other than installing Xcode and troubleshooting their machines.

Let me recommend you to offer your team to use a version control system as it’s Git. Why Git? Sure you could go and offer Subversion, mercurial and others but Git is very functional, easy and trending these days.

Before you get an approval from a big fish in your organization to get a professional solution as could be a cloud based or in-house dedicated server I think is a good idea to have an easy to manage and easy to maintain server in your network for your users to see the benefits and spread the word until it reaches the big guys.

I played around with a couple of solutions to offer my team and the Java based Gitblit is the fastest and easiest to get you going in 10 minutes!

First go to their website and click on the green button on the right hand side to download the GO version.

Decompress the zip file and open the file with vim, nano or any other, the minimum things you need to change to get the server up are:

git.repositoriesFolder = /Users/Shared/git
server.httpPort = 8080
server.httpsPort = 8443
server.httpBindInterface =
server.httpsBindInterface =

Sure there are maaaany tweaks you can do so it is more secured and customized. But as minimum these are the 5 lines you care about.

Then just open, navigate to the giblit folder and execute

bash-3.2$ java -jar gitblit.jar

And you are good to go. Open a web browser and navigate to http://yourserver.yo:8080 and login as admin:admin

Create a test user, create a test repository, cd to a folder,

bash-3.2$ git init
git remote add gitblit http://yourserver.yo:8080/git/MyTestRepo.git
git add *
git commit
git push gitblit master

When putting in production consider enable the authentication based on your current ldap server (new feature of giblit 1.0 !!), creating an SSL certificate, don’t use plain http and redirect alway to https, enable it as a service or even better run it behind the Apache service, backup the repos and Gitblit’s configuration, change the local admin password, and other common sense things I am sure you can think of.

See some of the options that the repositories have in this screenshot: