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

Re: Managing websites with git

From
TJTodd A. Jacobs <nospam@codegnome.org>
Date
Jan 3, 2009, 21:29 UTC
Message-ID
<20090103212908.GG6136@penguin.codegnome.org>
In-Reply-To
<fe5a74300811300830x850d81csc5cf1f9b367bac11@mail.gmail.com>
On Sun, Nov 30, 2008 at 05:30:30PM +0100, Felix Andersen wrote:
> I was thinking about any security issues with the .git dir being
> hosted. Or is that even the right way to do it?

With Apache, you can add the following to your httpd.conf file, or to an .htaccess file within your document root:

    <DirectoryMatch "^\.git">
	Order allow,deny
	Deny from all
    </DirectoryMatch>
    <FilesMatch "^\.gitignore">
	Order allow,deny
	Deny from all
    </FilesMatch>
to prevent web access to the respository.
-- 
"Oh, look: rocks!"
	-- Doctor Who, "Destiny of the Daleks"
Previous: Leo Razoumov
Message 10 of 10 in “Managing websites with git”
  1. Felix AndersenNov 30, 2008
  2. David BrysonNov 30, 2008
  3. Jeff KingNov 30, 2008
  4. Jason RiedyDec 2, 2008
  5. Jeff KingDec 2, 2008
  6. Jason RiedyDec 2, 2008
  7. Jeff KingDec 2, 2008
  8. Junio C HamanoDec 2, 2008
  9. Leo RazoumovDec 2, 2008
  10. Todd A. JacobsJan 3, 2009

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.