我该如何阅读使用gitolite访问每个人 [英] How can I give read Access to everybody with gitolite

查看:97
本文介绍了我该如何阅读使用gitolite访问每个人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的gitolite.conf中,我可以设置

  repo COOL_REPOSITORY 
RW + = me
R = @all

这使我可以编写访问权限,所有其他注册用户都可以访问我的存储库。现在我的问题是,我可以给每个人读取访问权限,而不仅仅是通过在我的keydir中存储ssh-keys来注册的用户吗?

/ div>

您可以从http VirtualHost配置中调用gitolite,就像我在我的项目中一样。

 #GitHttp on @Port_HTTP_HGIT @ 
Listen @ PORT_HTTP_HGIT @
< VirtualHost @FQN @:@ PORT_HTTP_HGIT @>
ServerName @ FQN @
ServerAlias @ HOSTNAME @
SetEnv GIT_PROJECT_ROOT @ H @ /存储库
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GITOLITE_HTTP_HOME @ H @
ScriptAlias / hgit / @ H @ / sbin / gitolite-shell /
SetEnv GIT_HTTP_BACKEND@ H @ / usr / local / apps / git / libexec / git-core / git -http-backend
< Location / hgit> ;
...

Gitolite不要求用户注册ssh密钥:它只是授权图层



但仍然通过http调用gitolite确保您保持其他Gitolite功能处于活动状态,如:


  • 审计线索( .gitolite /日志:你仍然知道至少哪个IP地址克隆/拉/推回购)

  • 控制访问(如果需要删除<$ c


    直接使用git-daemon或直接http访问,根本不使用Gitolite,将意味着放弃任何控制权。


    in my gitolite.conf i can set

    repo    COOL_REPOSITORY
            RW+     =   me
            R       =   @all
    

    This gives me writing access, and all other REGISTERED users have read access to my repository. Now my question is, can i give read access to everybody, not only to users which i have registered by storing their ssh-keys in my keydir?

    解决方案

    You can call gitolite from an http VirtualHost configuration, like I do in my project.

    # GitHttp on @PORT_HTTP_HGIT@
    Listen @PORT_HTTP_HGIT@
    <VirtualHost @FQN@:@PORT_HTTP_HGIT@>
      ServerName @FQN@
      ServerAlias @HOSTNAME@
      SetEnv GIT_PROJECT_ROOT @H@/repositories
      SetEnv GIT_HTTP_EXPORT_ALL
      SetEnv GITOLITE_HTTP_HOME @H@
      ScriptAlias /hgit/ @H@/sbin/gitolite-shell/
      SetEnv GIT_HTTP_BACKEND "@H@/usr/local/apps/git/libexec/git-core/git-http-backend"
      <Location /hgit>
        ...
    

    Gitolite doesn't require users to register ssh keys: it is only an authorization layer.

    But still calling gitolite through http ensure that you keep other Gitolite features active, like:

    • audit trail (in .gitolite/logs: you still know at least which IP address did clone/pull/push your repo)
    • control access (in case you need to remove the @all rule at any moment)

    Using directly git-daemon or a direct http access, without using Gitolite at all, would mean renouncing to any control access.

    这篇关于我该如何阅读使用gitolite访问每个人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆