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?

  • Subtree push in JGit
  • JGit create remote repository?
  • How do we check equality of two Objects i.e. file contents in repository by using CommitIds?
  • Is there a better database than Git (with serializable, immutable, versioned trees)?
  • JGit detect rename in working copy
  • git svn fetch with jgit
  • Using native git not jgit in Eclipse git?
  • calculating a git packfile sha1 checksum in java
  • 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.

    Git Baby is a git and github fan, let's start git clone.