From 938c4648b102975cd73f82457544ec7dc0318bfa Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 4 Oct 2021 08:10:24 +0530 Subject: new art: b8 --- docs/posts/self-hosting_git/index.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'docs/posts/self-hosting_git') diff --git a/docs/posts/self-hosting_git/index.html b/docs/posts/self-hosting_git/index.html index 618688f..f41a591 100644 --- a/docs/posts/self-hosting_git/index.html +++ b/docs/posts/self-hosting_git/index.html @@ -47,19 +47,19 @@

cgit is very bare bones. It is cgi-based web interface to git, and nothing more. You may browse repositories, view diffs, commit logs and even clone via http. If you are looking to replace Github with cgit, keep in mind that cgit does not handle issues or pull/merge requests. If people wish to contribute to your work, they would have to send you a patch via email.

Setup

Installing cgit is fairly straightforward, if you would like to compile it from source:

-
# fetch
-git clone https://git.zx2c4.com && cd cgit
-git submodule init
-git submodule update
-
-# install
-make NO_LUA=1
-sudo make install
+
# fetch
+git clone https://git.zx2c4.com && cd cgit
+git submodule init
+git submodule update
+
+# install
+make NO_LUA=1
+sudo make install

This would drop the cgit cgi script (and the default css) into /var/www/htdocs/cgit. You may configure cgit by editing /etc/cgitrc. I specify the NO_LUA flag to compile without lua support, exclude that flag if you would like to extend cgit via lua scripts.

Going live

You might want to use, fcgiwrap, a fastcgi wrapper for cgi scripts,

-
sudo apt install fcgiwrap
-sudo systemctl start fcgiwrap.socket
+
sudo apt install fcgiwrap
+sudo systemctl start fcgiwrap.socket

Expose the cgit cgi script to the web via nginx:

# nginx.conf
 server {
-- 
cgit v1.2.3