Re: Error: unable to unlink ... when using "git gc"

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

 



[re-adding git@vger; please keep discussion on-list so everyone can
benefit from the result]

On Tue, Jan 06, 2009 at 03:52:12PM +0800, Johnny Lee wrote:

> Thanks Peff, I've checked the permission of .git/objects/16, it's
> created by another user and thus I have no permission to remove it.
> 
> In fact, this is coming from a previous bad practice on setting up a
> collaboration repository on a SSH server, here is what I've done so
> far:
> [...]
> 7. Then the user "git" has changed mode for all the files under .git
> to writable.
> 
> 8. This time, user "johnny" can push successfully.

If you are going to have multiple users sharing a repository, generally
they should be in the same group and the core.sharedrepository config
option should be set (see "git help config", or the "shared" option to
git-init).

I've never used that personally, though. I have always just used POSIX
ACLs, with a default ACL on each directory giving access to everyone.
E.g. (off the top of my head):

  for user in user1 user2 user3; do
    setfacl -R -m u:$user:rwX -m d:u:$user:rwX /path/to/repo
  done

-Peff
--
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]

  Powered by Linux