How can I give read Access to everybody with gitolite

前端 未结 2 707
生来不讨喜
生来不讨喜 2021-01-03 01:26

in my gitolite.conf i can set

repo    COOL_REPOSITORY
        RW+     =   me
        R       =   @all

This gives me writing access, and all

2条回答
  •  -上瘾入骨i
    2021-01-03 01:49

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

    # GitHttp on @PORT_HTTP_HGIT@
    Listen @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"
      
        ...
    

    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.

提交回复
热议问题