Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带有subgit和apache的GIT SVN_Git_Apache_Svn_Subgit - Fatal编程技术网

带有subgit和apache的GIT SVN

带有subgit和apache的GIT SVN,git,apache,svn,subgit,Git,Apache,Svn,Subgit,我已经开始评估一个名为的软件,它可以无缝地将回购协议与SVN或GIT连接起来 在我们的整个组织中,我们使用apache连接我们的回购协议,试图将其与GIT结合起来会有点麻烦 总的来说,我们希望在没有身份验证的情况下允许读访问,而写操作应该经过身份验证,这在SVN中可以很好地工作,但在GIT中似乎没有那么直接 除此之外,让apache确定它是否是GIT/SVN请求,并确定客户端指向何处,这样无论使用何种回购系统,都可以使用相同的url,这将是一件好事 下面是配置,现在我们已经为svn提供了正确的读

我已经开始评估一个名为的软件,它可以无缝地将回购协议与SVN或GIT连接起来

在我们的整个组织中,我们使用apache连接我们的回购协议,试图将其与GIT结合起来会有点麻烦

总的来说,我们希望在没有身份验证的情况下允许读访问,而写操作应该经过身份验证,这在SVN中可以很好地工作,但在GIT中似乎没有那么直接

除此之外,让apache确定它是否是GIT/SVN请求,并确定客户端指向何处,这样无论使用何种回购系统,都可以使用相同的url,这将是一件好事

下面是配置,现在我们已经为svn提供了正确的读访问权限w/o auth和使用auth的写访问权限,但是对于GIT,它是r/w,没有身份验证

ServerName android.subgit.domain.tld
DocumentRoot /home/subgit/public_html
CustomLog /home/subgit/logs/access_log combined
SetEnv GIT_PROJECT_ROOT /home/subgit/repos/subgit-repo
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend/
   <LocationMatch "/svn">
      DAV svn
      SVNPath /home/subgit/repos/subgit-repo
      Include /etc/apache2/conf.d/auth-mysql
      AuthzSVNAccessFile /home/subgit/etc/subgit-repo
      <LimitExcept GET PROPFIND OPTIONS REPORT>
          Require valid-user
      </LimitExcept>
   </LocationMatch>
   <LocationMatch "/git">
      Options +ExecCGI
   </LocationMatch>
   <Directory "/usr/local/libexec/git-core/git-receive-pack">
     Include /etc/apache2/conf.d/auth-mysql
     Require valid-user
   </Directory>
</VirtualHost>
ServerName android.subgit.domain.tld
DocumentRoot/home/subgit/public\u html
CustomLog/home/subgit/logs/access\u log组合
SetEnv GIT_PROJECT_ROOT/home/subgit/repos/subgit repo
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv远程用户$REDIRECT\u远程用户
ScriptAlias/git//usr/local/libexec/git-core/git-http-backend/
DAV svn
SVNPath/home/subgit/repos/subgit repo
Include/etc/apache2/conf.d/auth-mysql
authzsvnacessfile/home/subgit/etc/subgit repo
需要有效用户
选项+执行CGI
Include/etc/apache2/conf.d/auth-mysql
需要有效用户

任何意见都将不胜感激

这个问题是重复的,请找出答案。