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

Re: git for local web development

From
Jeff King <peff@peff.net>
Date
Apr 17, 2009, 11:59 UTC
Message-ID
<20090417115925.GB29121@coredump.intra.peff.net>
In-Reply-To
<135754252540163221910297561025355826788-Webmail@me.com>
On Thu, Apr 16, 2009 at 07:04:10PM -0400, William DiNoia wrote:
Show 20 quoted lines
> I would like to be able to git-push and have the work tree updated.
>
> [...]
>
> $vim .git/hooks/post-receive
>  #!/bin/sh
>  git-checkout -f
> $chmod +x .git/hooks/post-receive
>
> [...]
>
> Counting objects: 5, done.
> Compressing objects: 100% (2/2), done.
> Writing objects: 100% (3/3), 277 bytes, done.
> Total 3 (delta 1), reused 0 (delta 0)
> Unpacking objects: 100% (3/3), done.
> To /var/www/sites/test.com/.git
>    9b490a2..5e5cc63  master -> master
> error: unable to unlink old 'index.html' (Permission denied)
> error: hooks/post-receive exited with error code 1

Well, your post-receive hook is running, and checkout is barfing with a permission denied error. Probably the repo directory is owned by www-data, and you are pushing as user "william"? What are the directory permissions like?

-Peff
Previous: William DiNoiaNext: William DiNoia
Message 2 of 6 in “git for local web development”
  1. William DiNoiaApr 16, 2009
  2. Jeff KingApr 17, 2009
  3. William DiNoiaApr 17, 2009
  4. Jeff KingApr 17, 2009
  5. Martin LanghoffApr 17, 2009
  6. William DiNoiaApr 17, 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.