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

Re: Update a bare repository

From
Jeff King <peff@peff.net>
Date
Jul 17, 2007, 07:31 UTC
Message-ID
<20070717073115.GA14629@coredump.intra.peff.net>
In-Reply-To
<20070717072635.GG5823@cip.informatik.uni-erlangen.de>
On Tue, Jul 17, 2007 at 09:26:35AM +0200, Thomas Glanzmann wrote:
Show 5 quoted lines
> > The simplest thing is not to give write access to the repo for your
> > pushers. However, you could also put in a pre-receive hook that rejects
> > all pushes.
> 
> Is there an example somewhere?
Not that I know of, but it should be as simple as:

echo "echo Sorry, no pushing allowed.; exit 1" >.git/hooks/pre-receive chmod +x .git/hooks/pre-receive

-Peff
Previous: Thomas GlanzmannNext: Thomas Glanzmann
Message 4 of 5 in “Update a bare repository”
  1. Thomas GlanzmannJul 17, 2007
  2. Jeff KingJul 17, 2007
  3. Thomas GlanzmannJul 17, 2007
  4. Jeff KingJul 17, 2007
  5. Thomas GlanzmannJul 17, 2007

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.