git on Tizen 2.3.1

December 19, 2015    Article    313 words    2 mins read

Check out the date on this baby!!

This content was originally published a while ago and could be quite outdated.

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.

$ cd /opt/usr/src
$ wget https://github.com/git/git/archive/v2.6.4.tar.gz -O git-2.6.4.tar.gz
$ tar -xzvf git-2.6.4.tar.gz
$ cd git-2.6.4
$ make configure
$ ./configure --prefix=/usr
$ make all
$ 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 summarise, 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.