2016-09-08 48 views
0

我們使用apache 2.2和鉤子腳本來提供額外的活動。作爲用戶apache的SVN後提交

我們唯一的身份驗證是基於ldap,它工作正常。

現在特定的post-commit試圖運行爲apache。但是這個用戶不存在於LDAP中。我收到以下錯誤信息:

[Thu Sep 08 09:57:51 2016] [warn] [client <IP>] [24570] auth_ldap authenticate: user apache authentication failed; URI /repo [User not found][No such object] 
[Thu Sep 08 09:57:51 2016] [error] [client <IP>] user apache not found: /repo 
[Thu Sep 08 09:57:51 2016] [warn] [client <IP>] [24574] auth_ldap authenticate: user apache authentication failed; URI /repo/path/trunk [User not found][No such object] 
[Thu Sep 08 09:57:51 2016] [error] [client <IP>] user apache not found: /repo/path/trunk 

這裏是認證的定義:

AuthType Basic 
AuthBasicProvider ldap 
AuthzLDAPAuthoritative On 
AuthName "Reponame" 
AuthLDAPURL "..." 
AuthLDAPBindDN "..." 
AuthLDAPBindPassword ... 
AuthLDAPGroupAttribute member 

# Read-Only 
<Limit GET PROPFIND OPTIONS REPORT> 
    Require ldap-group CN=... 
    Require ldap-group CN=... 
</Limit> 
# Read-Write 
<LimitExcept GET PROPFIND OPTIONS REPORT> 
    Require ldap-group CN=... 
</LimitExcept> 

Order deny,allow 
Allow from all 

這兩種解決方案:授予對回購(無密碼)用戶Apache訪問或使用原始登錄 - 憑證對我來說可以。

親切的問候, 菲利普

回答

0

問題在於通過HTTP(S)訪問SVN的倉庫。

你是在本地服務器上,以便您可以使用文件://(無身份驗證的話),或者您提供有問題的用戶名與CMDLINE --username --password開關: 例如

svn ls http://svn.example.com/repo --username foo --password bar --no-auth-cache 

(該--no-auth的緩存避免保存PW IN svns密碼存儲)

+0

謝謝你的建議。我用svnserve和svn解決了這個問題:// – pwe