git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Post-update hook problems
@ 2007-10-05 11:27 Geoffrey Ferrari
  2007-10-05 12:08 ` Frank Lichtenheld
  0 siblings, 1 reply; 3+ messages in thread
From: Geoffrey Ferrari @ 2007-10-05 11:27 UTC (permalink / raw)
  To: git

I have a public and a private git repository on the same machine, in
the same user's home directory. I want to ensure that when the public
repos is updated, the private repos automatically receives those
updates. Let's just assume that this is a good idea.

So, I've created a post-update hook script and made it executable. The
script is very simple. It 'cd's to the private repos and then does a
git pull. It looks, in essence, like this:

--
#!/bin/sh

cd /user/home/private/repos
git pull

exit 0
--

When I run this script directly, it works fine. (It also works fine
when I run it directly over ssh). However, when I do a git push to the
public repos, (either locally or remotely over ssh) the script is
called but reports back the following error:

--
fatal: Not a git repository: '.'
Failed to find a valid git directory.
--

Can anyone explain why this happens? And how can I make the script
work properly?

With sincere thanks for your help,

Geoffrey Ferrari

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-05 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 11:27 Post-update hook problems Geoffrey Ferrari
2007-10-05 12:08 ` Frank Lichtenheld
2007-10-05 12:27   ` Mike Ralphson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).