From owner-freebsd-ports@freebsd.org Mon Mar 29 20:18:42 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D27B65AA09B for ; Mon, 29 Mar 2021 20:18:42 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.evolve.de (mail.evolve.de [213.239.217.29]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.evolve.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8P6T4FPZz4cnN for ; Mon, 29 Mar 2021 20:18:40 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mail.evolve.de (OpenSMTPD) with ESMTP id 83e659cc; Mon, 29 Mar 2021 20:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=grem.de; h=date:from:to:cc :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20180501; bh=uiUYhgyw SFI08CSiSDl7SPLJlxw=; b=rsQfgHBLzb96Nxvsc72nOvEWifUFkIqaQmCEcrej h5KEB/+Goo8Akt0GBHQpgikODIgYUGb+WgoeZP0ERFC+cfZ1aCJ+7hGcVyxQVzhi 9KhG0L6pWbj2/L7jrHgxq54wmOSWYVElkF+1N/phv9OljGbvMMiN4M9SnT/34R5d jgEK5xkdSZ/rdh1Cqk5+WQta9jWAq32NkpRYFwvwcBfR4Zb5J47wF3Evmkzda1zE sXyyHcMgiFPkac3IHeM7/xzuh82RqiUcCjrC0LOZtkgwHY/EC2o9y/k0aT5yE5c0 w0Hsi8P5KCB7Gp/shc363vT98FCelVSG1VFBhxPrMuhHTw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=grem.de; h=date:from:to:cc :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=20180501; b=sY pkStFcA9N96nRVmTdwSNm3m89LcFsZTlr2e8OO2QBbkVjqR9lKczB4byzCoKhA1P W169Y88uJ0Kuin/CDavFShELXnAYM+sJqZF7d2fN37isw2sxRNbY4MMpV4+IlG9a KqWbk+psMA4r5gnQEmyDTN0+dpk4ak7M8oBbu8it0Gw7jyrZ6yB/XkpqS8F9nEuM YF/GwkARHiWwm/8Y9+h1Emuu4Gqn5VgDEF2bUuW+9Di05Cw9I18oE8Lpx+NdL6rs Pz+gAAEaug1I0dCdOwdG4suRvMvEMl9/zxL1QBHyzcHzPytt/QsrirrSh/AbDrh9 aaaVAYHgOfCsS5Z4h/3w== Received: by mail.evolve.de (OpenSMTPD) with ESMTPSA id f01290e5 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Mon, 29 Mar 2021 20:18:36 +0000 (UTC) Date: Mon, 29 Mar 2021 22:18:35 +0200 From: Michael Gmelin To: "Hartmann, O." Cc: FreeBSD Ports Subject: Re: devel/git: Git via Apache 2.4 HTTPS - info/refs not valid: could not determine hash algorithm Message-ID: <20210329221835.752fa286@bsd64.grem.de> In-Reply-To: <20210329202624.6b4d809c@hermann.fritz.box> References: <20210328130819.01a1d7e6@hermann.fritz.box> <20210329114228.69fae81b@bsd64.grem.de> <20210329202624.6b4d809c@hermann.fritz.box> X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4F8P6T4FPZz4cnN X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=grem.de header.s=20180501 header.b=rsQfgHBL; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@grem.de designates 213.239.217.29 as permitted sender) smtp.mailfrom=freebsd@grem.de X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[grem.de:s=20180501]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:213.239.217.29/32]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grem.de]; SPAMHAUS_ZRD(0.00)[213.239.217.29:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[grem.de:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[213.239.217.29:from]; ASN(0.00)[asn:24940, ipnet:213.239.192.0/18, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-ports] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 20:18:42 -0000 On Mon, 29 Mar 2021 20:26:24 +0200 "Hartmann, O." wrote: > On Mon, 29 Mar 2021 11:42:28 +0200 > Michael Gmelin wrote: > > > On Sun, 28 Mar 2021 13:08:19 +0200 > > "Hartmann, O." wrote: > > > > > What am I missing here? > > > > > > > The man page of git-http-backend has an apache2 example[0]. > > Also, the top answer to this stackoverflow question might give you a > > hint: https://stackoverflow.coo-set-up-git-over-http > > > > Best, > > Michael > > > > [0]https://www.freebsd.org/cgi/man.cgi?query=git-http-backend&apropos=0&sektion=0&manpath=FreeBSD+12.2-RELEASE+and+Ports&arch=default&format=html > > > > > > Hello Michael, > > thanks for responding. > The first tip I came across was the Stackoverflow HowTo - whatever I > did and do, it doesn't work. I also tried the several variants shown > in [0], starting with the simplest towards more complex ones. > > Following strictly the reference at > > https://stackoverflow.com/questions/26734933/how-to-set-up-git-over-http > > with minor local adaptions (for FreeBSD and the Git base folder), > even with anonymous access allowed the failure is the same as with > some Basic authentication via LDAP. > > As decribed in my initial email: first access with a "git push -u > origin master" is logged by Apache with 401, requesting credentials. > If provided, the line (httpd-access.log): > > xx.xx.xx.xx - USERNAME [29/Mar/2021:17:44:55 +0000] "GET \ > /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 200 1689032 > "-" "git/2.31.0" \ 323 1691601 > > status code 200 indicates OK - so authetication is all right and I > should proceed, but I get on the client > > fatal: https://[url]/git/test.git/info/refs not valid: could not > determine hash algorithm; is this a git repository? > > On both sides, I had disabled sslVerify (due to self signed cert > issue with git, another pitfall) and according to stackoverflow > howto, hooks are also prepared and the root folder and its subsequent > folders /pool/gitbase (PROJECT_ROOT) is owned by www:www and has ACL > 0775 set. > > And this is why it gets desperate to me ... I played a bit with this - turns out that the key is to make sure that the cgi module is loaded (e.g., mod_cgi). This is the simple basic setup I tested (using bash): pkg install apache24 git service apache24 enable cat >/usr/local/etc/apache24/Includes/git.conf<<"EOF" LoadModule cgi_module libexec/apache24/mod_cgi.so LoadModule rewrite_module libexec/apache24/mod_rewrite.so ServerName 127.0.0.1 SetEnv GIT_PROJECT_ROOT /usr/local/www/git/ SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend/ RewriteCond %{QUERY_STRING} service=git-receive-pack [OR] RewriteCond %{REQUEST_URI} /git-receive-pack$ RewriteRule ^/git/ - [E=AUTHREQUIRED:yes] Order Deny,Allow Deny from env=AUTHREQUIRED AuthType Basic AuthName "Git Access" Require group committers Satisfy Any EOF mkdir -p /usr/local/www/git/test.git git init --bare /usr/local/www/git/test.git service apache24 start git clone http://localhost/git/test Cheers, Michael > > Kind regards, > > O. Hartmann -- Michael Gmelin