[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Set up cgit with git-http-backend properly

From: Simon Streit
Subject: Set up cgit with git-http-backend properly
Date: Thu, 30 Jun 2022 12:40:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)


Lately I've been running a cgit instance serving a local Guix channel
with my own personal modifications.

Here's my code snippet:
--8<---------------cut here---------------start------------->8---
  (enable-git-config? #t)
  (remove-suffix? #t)
  (root-title "")
  (clone-prefix (list "";))
  (strict-export "git-daemon-export-ok")
     (server-name '(""))
     (root cgit)
        (git-http-configuration (uri-path "/")))
        (uri "@cgit")
        (body '("fastcgi_param SCRIPT_FILENAME 
                "fastcgi_param PATH_INFO $uri;"
                "fastcgi_param QUERY_STRING $args;"
                "fastcgi_param HTTP_HOST $server_name;"
     (try-files (list "$uri" "@cgit"))
     (ssl-certificate "/etc/letsencrypt/live/")
     (ssl-certificate-key "/etc/letsencrypt/live/"))))))
--8<---------------cut here---------------end--------------->8---

With this setting running guix pull onto a channel will error out:
--8<---------------cut here---------------start------------->8---
guix pull: error: Git error: invalid content-type: 'text/plain; charset=UTF-8'
--8<---------------cut here---------------end--------------->8---

Which appears that my nginx instance or cgit is still serving git
repositories over git's old dumb http protocol instead of providing it
over git-http-backend.  The logs in nginx are suggesting no error

Chances are that I got it wrong from reading the manual.  Has anyone
else set this up yet?  It'd be grand to have this working.

Thanks in advance!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]