git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git over HTTPS with basic authentication

From
Jeff King <peff@peff.net>
Date
Apr 19, 2013, 15:36 UTC
Message-ID
<20130419153639.GA14263@sigill.intra.peff.net>
In-Reply-To
<1366361766.3873.4.camel@sibbo-laptop>
On Fri, Apr 19, 2013 at 10:56:06AM +0200, Sebastian Schmidt wrote:
Show 7 quoted lines
> I tried switching to smart http now, but have the same error, I guess I
> did something wrong. It seems like it is getting 401, but I also noticed
> that info/refs is just an empty file. This is the config of my apache2:
> 
> SetEnv GIT_PROJECT_ROOT /crypt/git
> SetEnv GIT_HTTP_EXPORT_ALL
> ScriptAlias /git/ /usr/lib/git

This should point to /usr/lib/git/git-http-backend, which I think is the source of your problems.

Show 11 quoted lines
> <Directory /crypt/git>
> 	Allow from all
> 	Order deny,allow
> 	
> 	AuthType Basic
> 	AuthName "Git global"
> 	AuthUserFile /etc/apache2/auth/passwd
> 	AuthGroupFile /etc/apache2/auth/groups
> 	
> 	Require group git-shared
> </Directory>

I'm not sure this <Directory> match will do what you want, because from Apache's perspective, it is hitting /usr/lib/git/git-http-backend on the filesystem, and it is only git that actually touches the filesystem.

I think you want to use
  <Location /git>
     ...
  </Location>
instead. But I am not an Apache expert, so maybe it does work.
-Peff
Previous: Jeff King
Message 4 of 4 in “Git over HTTPS with basic authentication”
  1. Sebastian SchmidtApr 18, 2013
  2. Matthieu MoyApr 18, 2013
  3. Jeff KingApr 18, 2013
  4. Jeff KingApr 19, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.