The Samsung RD-PQ developer device running Tizen 2.3.1 can be a cool development server/machine, and you can add git repository hosting and administration with just a few easy steps. First of all, let’s compile and install git.

sh-1.4# cd /opt/usr/src
sh-1.4# wget https://github.com/git/git/archive/v2.6.4.tar.gz -O git-2.6.4.tar.gz
sh-1.4# tar -xzvf git-2.6.4.tar.gz
sh-1.4# cd git-2.6.4
sh-1.4# make configure
sh-1.4# ./configure --prefix=/usr
sh-1.4# make all
sh-1.4# make install

When done, git binaries will be installed into /usr/bin; hosting your own git repositories can be done two ways, using gitolite or gogs. Gogs requires a Go compiler (which you should have already installed in the previous tutorial), but it has an UI to manage your repositories, users, issues per project, etc. I highly recommend Gogs, but gitolite is just a basic tool that does its intended job perfectly.

Gitolite

To summarize, in order to use gitolite for hosting your own git repositories, you need git installed (obviously), Perl and OpenSSH. Let’s start by creating the /opt/usr/git folder and uploading your public key to it (gitolite.pub).

# mkdir /opt/usr/git
# groupadd git
# useradd --system --shell /bin/bash -g git --home /opt/usr/git git
# chown -R git:git /opt/usr/git
# su - git

Now, while logged as the git user, do the following:

$ cd ~/
$ git clone git://github.com/sitaramc/gitolite
$ mkdir bin
$ /opt/usr/git/gitolite/install -to /opt/usr/git/bin
$ /opt/usr/git/bin/gitolite setup -pk gitolite.pub
$ rm gitolite.pub
$ exit

Gitolite is installed now, you can test it from your other machine by cloning the gitolite-admin repo.

$ git clone git@your-tizen-server-ip:gitolite-admin.git

Gogs

Download gogs for ARM from Github and extract the archive.

# cd /opt/usr
# wget https://github.com/gogits/gogs/releases/download/v0.8.0/linux_arm.zip
# unzip linux_arm.zip
# cd gogs
# ./gogs web &

The last command will start the gogs server, allowing you to install it using a database back-end, create your first user and upload a SSH key for that user. Everything is straightforward and easy to do.