【问题标题】:using gitosis for GIT将 gitosis 用于 GIT
【发布时间】:2010-04-28 09:34:46
【问题描述】:

我希望用户 A 和 B 进行克隆、推送和拉取,而用户 C 只能进行克隆和拉取(无推送)

我该怎么做?

【问题讨论】:

    标签: git gitosis


    【解决方案1】:

    git-dameon 用于公共访问。但是您可以使用 gitosis 授予特定用户组的只读访问权限。例如:

    [group thegood]
    writable = myRepo
    members = A B
    [group thebad]
    readonly = myRepo
    members = C
    [repo myRepo]
    description = "my project"
    

    更多信息请参见example.conf

    【讨论】:

      【解决方案2】:

      Gitosis 无法限制对存储库的写访问。如果用户在members 列表中,则它具有所有读取/提交权限。

      Original documentation 提到在这种情况下只需为存储库设置一个 git-daemon 实例:

      sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-11-20
        • 2011-03-12
        • 1970-01-01
        • 2012-03-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多