zoukankan      html  css  js  c++  java
  • git + https(apache2)比较方便地添加新版本库

    因apache2中添加一个git库需要修改conf文件,比较麻烦。

    所以在 /etc/apache2/mods-available/dav_git.conf 中可以这样写:

    Alias /git "/repository_git/"
    
    <Directory "/repository_git/">
            DAV On
            SSLRequireSSL
            Options +Indexes +FollowSymLinks
    
            Deny from all
    
            AuthType Basic
            AuthName "Git Repository"
            AuthUserFile "/authz/svn_git_passwd"
            AuthGroupFile "/authz/git_group"
    </Directory>
    
    Include /authz/git_config.d/*.conf

    然后在 /authz/git_config.d/ 目录可以为每个项目单独放一个conf文件来配置每个仓库。
    cat svn_authz/git_config.d/testproject.conf

    <directory "/repository_git/testproject.git/">
            Allow from all
            Order Allow,Deny
    
            #read only grourp
            <Limit GET>
                    Require group guest
            </Limit>
            #commit group
            <Limit GET PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                    Require group testproject_admin
            </Limit>
    </Directory>

    注: 以上配置文件中的目录仅供参考,请根据实际情况合理安排目录。

  • 相关阅读:
    phpHttp请求头
    第八周学习总结
    梦断代码阅读笔记-03
    第七周学习总结
    针对自己开发项目的NABC的认知
    梦断代码阅读笔记
    第六周学习总结
    第五周学习总结
    移动端疫情展示
    第四周学习总结
  • 原文地址:https://www.cnblogs.com/aozima/p/2838323.html
Copyright © 2011-2022 走看看