Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sharedRepository config option not honored #3733

Open
mroi opened this issue Apr 8, 2016 · 2 comments
Open

sharedRepository config option not honored #3733

mroi opened this issue Apr 8, 2016 · 2 comments

Comments

@mroi
Copy link

mroi commented Apr 8, 2016

The git configuration option sharedRepository can be used to explicitly specify permissions of newly created files by setting it to 0xxx with the xxx part giving the permission bits in the usual octal notation.

I have a repository with sharedRepository set to 0750, and I am using the libgit2 application GitUp. But commits create new objects with world-readable permissions. I have been told by the GitUp developer, that this falls within the responsibilities of libgit2. I currently work around the problem using scripts, but it would be great if libgit2 could support sharedRepository permissions directly.

@PromyLOPh
Copy link

PromyLOPh commented Jul 26, 2021

This still seems to be the case for v1.1.

I have the opposite problem using the libgit2-backed pygit2. It honors git’s recorded file permissions (0644 minus umask 0007) and creates files with mode 0640, even though I set sharedRepository = group. The expected mode here would be 0660. git pull/git checkout correctly honors this setting.

I assumed this setting would affect checked out files, which is not true. The setting is still not honored for files in .git though.

@ethomson
Copy link
Member

This feels like a great place for a new contributor to jump in so I added some labels to encourage that. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants