Posted on

Use gitea to self-host git repositories

GITEA

GIT has become the most popular tool for source code management(based on google trend). There are many git-based hosting solutions available: github, gitlab, bitbucket,etc.

For self-hosting your only choice is gitlab, which many use. However for me it is too heavy. I want to have something that is light-weight.

I found gitea today, which is a fork from gogs, a small but elegant git self-hosting software written in Go language.  gitea just made its 1.0 release and I tried it today and am totally sold.

Installation and Configuration

https://docs.gitea.io/en-us/install-from-binary/

After the installation, you can run it on any port(the default is 3000). e.g. ./gitea web –port 4000, then point your browser to http://localhost:4000 and follow the install wizard. Your git repositories will be at $HOME/gitea-repositories by default.

https://docs.gitea.io/en-us/config-cheat-sheet/ is for advanced configuration. You do not need change them to start using gitea.

Wiki Syntax

It took me a while to figure out how to use its Wiki, basically to link to another Wiki page(e.g. Wiki-title) you can use the syntax below. Note for each git repository you will have a separate wiki git repository.

[Wiki-title](wiki/Wiki-title)

Screenshots