unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Set up cgit with git-http-backend properly
@ 2022-06-30 10:40 Simon Streit
  2022-07-02  9:35 ` pelzflorian (Florian Pelz)
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Streit @ 2022-06-30 10:40 UTC (permalink / raw)
  To: help-guix

Hello!

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---
(service
 cgit-service-type
 (cgit-configuration
  (enable-git-config? #t)
  (remove-suffix? #t)
  (root-title "git.example.com")
  (clone-prefix (list "https://git.example.com"))
  (strict-export "git-daemon-export-ok")
  (nginx
   (list
    (nginx-server-configuration
     (server-name '("git.example.com"))
     (root cgit)
     (locations
      (list
       (git-http-nginx-location-configuration
        (git-http-configuration (uri-path "/")))
       (nginx-location-configuration
	(uri "@cgit")
	(body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;"
	        "fastcgi_param PATH_INFO $uri;"
	        "fastcgi_param QUERY_STRING $args;"
	        "fastcgi_param HTTP_HOST $server_name;"
	        "fastcgi_pass 127.0.0.1:9000;")))))
     (try-files (list "$uri" "@cgit"))
     (ssl-certificate "/etc/letsencrypt/live/example.com/fullchain.pem")
     (ssl-certificate-key "/etc/letsencrypt/live/example.com/privkey.pem"))))))
--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
though.

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!
Simon



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-06 16:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 10:40 Set up cgit with git-http-backend properly Simon Streit
2022-07-02  9:35 ` pelzflorian (Florian Pelz)
2022-07-04 10:29   ` Simon Streit
2022-07-04 10:38     ` Simon Streit
2022-07-06 16:27     ` pelzflorian (Florian Pelz)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).