Open tomfitzhenry opened 1 year ago
Ah, looks like directories .git/objects/de/
have the same problem: they're created g-w
, but need g+w
.
@tomfitzhenry would you be keen to propose a PR for this?
This may have some overlap with https://github.com/go-git/go-git/issues/528#issuecomment-1798246158.
I no longer have this usecase, since I now just use the same user to serve HTTP and SSH.
Per https://git-scm.com/docs/git-config, if
core.sharedRepository
= group, then "the repository is made shareable between several users in a group (making sure all the files and objects are group-writable)". This is useful when sharing an on-disk repo between two unix users (e.g. a web server, and a normal user accessing the repo via git push/pull over SSH).go-git seems to unconditionally create object files as 0600, meaning they are unaccessible to members of the group.
Steps to reproduce
git init --shared
(this setscore.sharedRepository
togroup
)Expected
Files created in
git/objects/
are at least group-readable, e.g. 0660.Actual
Files created in
.git/objects/
are 0600.What's happening