How to install Gitiles – repository browser for Git repositories on Ubuntu Linux

Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.

Gitiles automatically renders *.md Markdown files into HTML for simplified documentation.

Gitiles requires Bazel to build. You need to use Java for building Gitiles. Below steps installs Bazel and JDK as,

$ sudo apt install maven
$ sudo apt-get install openjdk-8-jdk
$ echo "deb [arch=amd64] stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
$ curl | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install bazel
$ sudo apt-get upgrade bazel

Make sure you are using openjdk-8-jdk

$ update-java-alternatives --list
$ sudo update-java-alternatives -s java-1.8.0-openjdk-amd64

Build and Install gitiles

$ mkdir /home/devlab/git_server
$ cd /home/devlab/git_server
$ git clone
$ cd gitiles
$ bazel build //...
$ bazel test //...

Here, for demo, we have created directory as “/home/devlab/git_server” you can create any directory and use the same to download the gitiles source code.

Create git repos which we want to display using gitiles on browser

The last step of setting up gitiles is to make sure, we start the gitiles server from the git repositories directory, as for understanding we will use two git repositories, 1. Existing downloaded git 2. Bare git repository we created

Related :   git init

Setup for using Existing downloaded git

$ cd /home/devlab/git_server
$ mkdir git_repos
$ cd git_repos
$ git clone

Now we have already existing git repository, which we just downloaded from github using git clone command, now the last important step is to start the gitiles server, the source code of which we downloaded and compiled using bazel as shown above and is in “/home/devlab/git_server/gitiles”

Now we need to start the gitiles server from the same location where we have the git repositories,

$ cd /home/devlab/git_server/git_repos
$ bash /home/devlab/git_server/gitiles/tools/

This will start the gitiles server and we can explore the git repositories over browser at http://localhost:8080/

Setup for using bare git repositories

Steps to setup the gitiles server remains same as above, except instead of “git clone”, we create the bare git repository locally which any one can use to push the code..

$ cd /home/devlab/git_server/git_repos
$ mkdir bare_git_example
$ cd bare_git_example
$ git --bare init 
$ cd ..
$ bash /home/devlab/git_server/gitiles/tools/

This will start the gitiles server and we can explore the git repositories over browser at http://localhost:8080/

Reference :


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded