GITcloud is an alternative for selfhosted GitHub or GitLab like websites by generating static html pages

GIT repository website cloud github gitlab


README.md/
# GITcloud

GITcloud is a distribution of perl modules and scripts to generate a **git**
repository overview like GitHub or GitLab completly out of static HTML files.

## Description

The distribution uses the static website generator  [HiD](https://github.com/genehack/HiD) by *genehack*. An additional HiD Plugin
[HiD::Generator::GitRepositories](https://gitcloud.federationhq.de/repositories/HiD-GitRepositories.git/heads/master/) is responsible for generating the HTML pages from the **git** repositories.

This distribution is a good addon to [Gitolite](http://gitolite.com/gitolite/index.html), if you want to make your gitolite managed public repositories available to the world.

## Features

* parses a directory of **git** repositories, generates a repository listing and individual repository pages for all branches and trees, like GitHub or GitLab
* offline syntax highlighting using Text::ColorVim, supporting a huge amount of different file formats
* repository metadata is parsed from the *metadata* branch within the repository, including description and tags.
* only repositories with new commits get regenerated

## Advantages

* generates static HTML files, making your **GITcloud** fast with a minimum of server resources
* no cookies are required, making is easy to be DSGVO conform
* reduced attack vectors against your server


## Disadvantages

* minimum user interaction possible (no likes, stars, or comments)
* website generation can take a while with many and large repositories
* at the moment no issue tracking (see planned)

## Installation

This is just a quick installation guide. More documentation will become available in the future.

1. change to the user you want to run gitcloud under. Keep in mind that this user requires access to your public git repositories (read) and write access to the webspace the HTML files should be served from.
2. install the [plenv](https://github.com/tokuhirom/plenv) environment
```
git clone git://github.com/tokuhirom/plenv.git ~/.plenv
```
3. To compile perl another plugin to plenv is necessary
```
git clone git://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/
```
4. initialize plenv
```
  export PATH="$HOME/.plenv/bin:$PATH;
  eval "$(plenv init -)"
```
5. compile perl 5.26.2
 ```
 plenv install -j 9 -D usethreads -D man1dir=none -D man3dir=none 5.26.2;
 plenv rehash
 ```
6. install cpanm
```
plenv install-cpanm;
plenv rehash
 ```
7. clone GITcloud and switch into the directory
```
git clone https://gitcloud.federationhq.de/git/GITcloud.git;
cd GITcloud
```
8. install GITcloud dependecies
```
cpanm --installdeps .
```
Be aware this step can take a long time, because a lot of perl modules are downloaded. But you only have to do this one time. If it bails out with an
error try to run the command again.
9. edit the _config.yaml file to your requirements
10. run every time you want to regenerate the HTML files
```
export PATH="$HOME/.plenv/bin:$PATH;
eval "$(plenv init -)";
hid publish
```