Re: git for local web development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff <at> peff.net> writes:

> 
> On Thu, Apr 16, 2009 at 07:04:10PM -0400, William DiNoia wrote:
> 
> > 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

I have since switched to using the post-update hook which now looks like:

git-checkout -f
exec git-update-server-info

However upon git-push from /home/william/Desktop I receive the following:

Counting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To /var/www/sites/test.com/.git
   e337c9b..581228f  master -> master
error: unable to unlink old 'index.html' (Permission denied)

The repo is owned by "www-data" and I am pushing as user "william". "william"
is in the "www-data" group. I also ran

git-config core.sharedrepository group

as "www-data", but no change...

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]