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

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

From
Johnny Lee <johnnylee194@gmail.com>
Date
Jan 6, 2009, 08:09 UTC
Message-ID
<488807870901060009i2f9f8b3dnb6be4b416d3b1318@mail.gmail.com>
In-Reply-To
<20090106080300.GA10079@coredump.intra.peff.net>
Ooops, forgot to cc to the mailing list.

Thanks for your sharing Peff, I'm going to check these stuffs out and get back with any findings.

Regards, Johnny

On Tue, Jan 6, 2009 at 4:03 PM, Jeff King <peff@peff.net> wrote:
Show 32 quoted lines
> [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
>
-- 
we all have our crosses to bear
Previous: Jeff KingNext: Sitaram Chamarty
Message 7 of 17 in “Error: unable to unlink ... when using "git gc"”
  1. Johnny LeeJan 6, 2009
  2. Jeff KingJan 6, 2009
  3. Junio C HamanoJan 6, 2009
  4. Johnny LeeJan 6, 2009
  5. Matthieu MoyJan 6, 2009
  6. Jeff KingJan 6, 2009
  7. Johnny LeeJan 6, 2009
  8. Sitaram ChamartyJan 6, 2009
  9. Johnny LeeJan 6, 2009
  10. Sitaram ChamartyJan 6, 2009
  11. Jeff KingJan 7, 2009
  12. Boyd Stephen Smith Jr.Jan 7, 2009
  13. Sitaram ChamartyJan 7, 2009
  14. Sitaram ChamartyJan 7, 2009
  15. Boyd Stephen Smith Jr.Jan 7, 2009
  16. Sitaram ChamartyJan 7, 2009
  17. Boyd Stephen Smith Jr.Jan 7, 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.