Run A Self Hosted GIT Service

Collaboration between developers necessitates some form of Source Code Management. The Linux Kernel’s SCM had received 6,400 commits from 1,175 different contributors in the last 30 days at the time this article was written. Managing this many contributions from so many different sources would not have been possible without GIT, a tool created by Torvalds in 2005 for that exact purpose.

Smaller projects require SCM as well, even if the developers involved with the project are sitting in the same room. Gitea provides a fast and painless way to self-host a GIT service with a web interface for small teams needing SCM. It’s written in Google’s Go programming language and will run anywhere Go will compile.

Gitea provides several wonderful packaged installation options for various platforms, however the automation provided here will install and run Gitea on RHEL/Centos/Fedora.

This installation script includes the gitea-1.16.6-linux-amd64 binary so that installation can be completed with a single file.

Move install_gitea.sh to the target server and execute:

./install_gitea.sh install

to begin installation. Alternatively ./install_gitea.sh remove will uninstall and remove any existing configurations.

The installer will install the Gitea server, configure a service account named git, add necessary configuration and working directories, and enable and start the service.

When the script completes, open a web browser on http://localhost:3000 to complete configuration.

Note: If will be necessary to allow TCP/3000 through your firewall first if firewalld is active.

Complete configuration via the Gitea WebUI:

Note: Sqlite is available by default. Other supported databases (MySQL, PostGres, MSSQL) will need to be installed and configured separately.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.