【问题标题】:jgit - cloning a repo creates files with my default umask permission and not the permissions in the repojgit - 克隆 repo 使用我的默认 umask 权限创建文件,而不是 repo 中的权限
【发布时间】:2017-01-27 14:43:23
【问题描述】:

我正在使用 jgit 来克隆我的存储库,但是当我这样做时,我注意到权限不是它们应有的权限。它们与我的 umask 设置相匹配,这是不可取的,因为 git 可以跟踪权限,这对配置文件至关重要。

这是可能的还是只是一个错误?

【问题讨论】:

    标签: java git jgit


    【解决方案1】:

    正如我在“Why is git clone changing file permissions”中提到的,您需要使用:

    git config core.sharedRepository group
    

    (否则,Git 会尊重 umask)

    但是,您需要检查 JGit 是否支持该配置(wasn't the case in the beginning

    注意Git only store 644 and 755

    【讨论】:

    • 这不能回答我的问题,我的问题对于 jgit 来说很清楚。我的 git 完全没有这个问题。
    • 那么 jgit 仍然不支持该配置,这正好回答了你的问题
    猜你喜欢
    • 2016-11-13
    • 2017-10-30
    • 1970-01-01
    • 2021-08-25
    • 1970-01-01
    • 1970-01-01
    • 2014-11-07
    • 2014-06-05
    • 2012-01-22
    相关资源
    最近更新 更多