jgit – cloning a repo creates files with my default umask permission and not the permissions in the repo
I am using jgit to clone my repository, but when I do, I notice that the permissions are not what they’re supposed to be. They match my umask setting which is undesirable since git can track the permissions and that is critical for the configuration files.
Is this possible or is it simply a bug?
- How to “cat” a file in JGit?
- JGit/EGit crashing on branch deletion/creation
- jGit - how to add all files to staging area
- Getting commit information from a RevCommit object in JGit
- JGit: How to pick and squash a region of commits from one branch to another
- Get a single file from a remote git repository
One Solution collect form web for “jgit – cloning a repo creates files with my default umask permission and not the permissions in the repo”
As I mention in “Why is git clone changing file permissions”, you would need to use:
git config core.sharedRepository group
(or otherwise, Git would respect the umask)
However, you need to check if JGit does support that config (that wasn’t the case in the beginning)
Note that Git only store 644 and 755.