2014-01-23 88 views
0

我使用Apache(和mod_dav_svn)通過https訪問服務器上的SVN存儲庫。檢出存儲庫並添加,刪除或編輯文件完美無瑕,但當我重命名或複製文件時,服務器在提交時返回400錯誤請求。svn COPY results in 400 Bad Request

Apache配置:

<VirtualHost *:443> 
    ServerName *** 

    SSLEngine on 
    SSLCertificateChainFile /etc/ssl/certs/sub.class1.server.ca.pem 
    SSLCertificateFile /etc/ssl/certs/***.crt 
    SSLCertificateKeyFile /etc/ssl/private/***.key 

    <Location /> 
      DAV svn 
      SVNParentPath /var/local/svn 
      SVNListParentPath on 
      Order deny,allow 
      Allow from all 
    </Location> 
    <LocationMatch /.+> 
      AuthzSVNAccessFile /var/local/conf/access.authz 
      AuthType Basic 
      AuthName "Subversion repository" 
      AuthUserFile /var/local/conf/.htpasswd 
      require valid-user 
    </LocationMatch> 
</VirtualHost> 

精確錯誤消息:

svn: E175002: Commit failed (details follow): 
svn: E175002: COPY of /***/!svn/bc/94/***: 400 Bad Request (https://***) 

SVN服務器:

$ svnadmin --version 
svnadmin, version 1.6.17 (r1128011) 

SVN客戶端通過我的IDE使用(IntelliJ IDEA的11):

Version: 1.7 
Format: 29 

很遺憾,我在apache錯誤日誌中找不到任何關於該問題的提示。 有什麼可以解決這個問題的建議?

編輯: 我注意到,當改變配置來

<LocationMatch /.+> 
      DAV svn 
      AuthzSVNAccessFile /var/local/conf/access.authz 
      AuthType Basic 
      AuthName "Subversion repository" 
      AuthUserFile /var/local/conf/.htpasswd 
      require valid-user 
    </LocationMatch> 

修復問題,並允許我使用SVN拷貝,但是當我現在嘗試更新我的本地工作目錄,我得到這個錯誤:

svn: E190001: Unusable URI: it does not refer to this repository 
svn: E175002: REPORT of '/.+/***/!svn/vcc/default': 500 Internal Server Error (***) 

錯誤在Apache的錯誤日誌:

[Thu Jan 23 18:00:18 2014] [error] [client 94.222.125.77] Could not parse 'src-path' URL. [500, #190001] 
[Thu Jan 23 18:00:18 2014] [error] [client 94.222.125.77] Unusable URI: it does not refer to this repository [500, #190001] 
+0

在客戶端和服務器上哪個版本的顛覆? –

+0

$ svnadmin的--version svnadmin的,版本1.6.17(r1128011) 工作在我的筆記本電腦複製是格式29(更高的格式不被我的IDE(IntelliJ IDEA的11),但支持) – Dero

+0

你真的不應該正在使用LocationMatch。只是把所有東西在

回答

0

我不是蘇關於第一個問題。

但是在更改配置後,第二個問題是由指令引起的LocationMatch引起的,因爲這會導致每個路徑都被計算爲存儲庫的根目錄。

這個配置應該工作:

<Location /> 
      DAV svn 
      SVNParentPath /var/local/svn 
      SVNListParentPath on 
      Order deny,allow 
      Allow from all 
      AuthzSVNAccessFile /var/local/conf/access.authz 
      AuthType Basic 
      AuthName "Subversion repository" 
      AuthUserFile /var/local/conf/.htpasswd 
      require valid-user 
</Location> 
+0

我前一段時間使用這個配置。不幸的是,似乎mod_dav_svn中存在一個錯誤,使得SVNListParentPath無法與AuthzSVNAccessFile配合使用。當我使用上面的配置並從我的瀏覽器訪問我的服務器時,我無法再看到可用存儲庫的列表(HTTP Error 443 Forbidden) – Dero

+0

我們使用1.7.0 http://subversion.tigris修復了該錯誤。組織/問題/ show_bug.cgi?ID = 2753。我們不再更新1.6.x,因此您可能應該在服務器端運行1.7.x或1.8.x。 –

+0

增加了Wandisco存儲庫,更新到1.8.5並且它工作。十分感謝 :) – Dero