From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eKwHOMN9vWI5VwEAbAwnHQ (envelope-from ) for ; Thu, 30 Jun 2022 12:41:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OITKN8N9vWIGCQEAauVa8A (envelope-from ) for ; Thu, 30 Jun 2022 12:41:07 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 86C621D30D for ; Thu, 30 Jun 2022 12:41:07 +0200 (CEST) Received: from localhost ([::1]:47734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6rbe-0003tn-7s for larch@yhetil.org; Thu, 30 Jun 2022 06:41:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6rb8-0003cx-Th for help-guix@gnu.org; Thu, 30 Jun 2022 06:40:38 -0400 Received: from smtprelay05.ispgateway.de ([80.67.31.99]:27750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6rb6-0005si-RF for help-guix@gnu.org; Thu, 30 Jun 2022 06:40:34 -0400 Received: from [79.252.159.196] (helo=motorball) by smtprelay05.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o6rbL-00085S-Gc; Thu, 30 Jun 2022 12:40:47 +0200 From: Simon Streit To: help-guix@gnu.org Subject: Set up cgit with git-http-backend properly Gcc: nnfolder+archive:sent.2022-06 Date: Thu, 30 Jun 2022 12:40:28 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: bGlzdHNAbmV0cGFuaWMub3Jn Received-SPF: none client-ip=80.67.31.99; envelope-from=simon@netpanic.org; helo=smtprelay05.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656585667; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=2uUA+5pO4nJBfB9IWj+1Y8EGO/flWcGnAQ5YuTwGV0g=; b=QgzBkpzqVwXJfCyaSOyhedpzjyGnNHUwhzV7xUMWNfaHkYTUyNvZBudYeEpLTxkoZb3f0q nbnnhTiSKyoQwjSdcvYkL2Z4ekXq/JhdqLfoGXriTj37kyEGAafMp+vEjB08eQ9zoohmkD Mzprt5Gf144LhLmMXevVuXblEyZq5poHIV+CZBawcCwnRVm2qTkgaDFeEasYfT9DUHUcMz uznVSKmONkSEo1eLRGu6kqJYKp6yEx+PeObQ+zBneYdzP9+u6VwHV2eNQW+W76HlyRZly+ ctly3YkwY6mxKAKoXHQ0Dj+HtTqvMVZ4Odi7bmSRIlxuqfu0wtyGuSfs4RW0OQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656585667; a=rsa-sha256; cv=none; b=JhZf7NsT5bGh/ZjBqzpG4F/bNZb/SSIGriCF0tdQATT/tdbFg0H3n8J4P4ca9L8zbPgdTy 4bpJ92Ri877D6IRKGPMORe7jZaxMqkHHDgwhNLlRcy7PS8lUohhdonIGzdxLN7YNEDv0vZ M8GXv3tx1rEqk5HVm7vCf+yEHBQYerZRLszODfmk9W2WLf1lCOcZb/FE9gKXovfgX1PIuk LhKW0cdIVyjjde5S7zd7Omeo8L4bh2on8n2K/UnURnwt6qgm8PLF1YLfhdxGvAt0uhw7O7 frf9YZkac/F9T0/XpnYrnS2CCsCmE+RSqIKD7eB8JIcUBIVl0vShmGlcyR1UMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.55 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 86C621D30D X-Spam-Score: -3.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: glsGRxonuIqT 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