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

Re: post-receive for web deployment

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Dec 19, 2011, 10:35 UTC
Message-ID
<CAMK1S_hjncBxdh4+UXAJbtJnsPWZUpWASyixG8eNcpFLMRpLgw@mail.gmail.com>
In-Reply-To
<CALzTOm+sJHF_7WzjD7bCqAiAbQSV0A3hEX1KdWfFzV7-ePzX2w@mail.gmail.com>
On Mon, Dec 19, 2011 at 8:12 AM, Stephen Major <smajor@gmail.com> wrote:
Show 5 quoted lines
> Hello,
>
> I am having some difficulty understanding what I am doing wrong when
> working with git to deploy a website through the use of a post-receive
> hook on the remote.

The most common issue I have seen in cases like this is that you need to 'unset GIT_DIR'. In fact, anytime you play around with running stuff from *inside* a hook that works fine when you run it from outside, you need to check what GIT_ variables are present.

I believe 'unset `git rev-parse --local-env-vars`' is a good idea too; probably much simpler.

Previous: Johannes SixtNext: Stephen Major
Message 3 of 4 in “Re: post-receive for web deployment”
  1. Stephen MajorDec 19, 2011
  2. Johannes SixtDec 19, 2011
  3. Sitaram ChamartyDec 19, 2011
  4. Stephen MajorDec 19, 2011

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.