问题
Some details (maybe it would be usefull for some guys):
On board: mac mini + mountain lion + Server.app.
Problem: I do have access to my subversion repo via browser, but do not have access to it via command line to checkout (for example).
I've done:
Got mod_dav_svn.so and mod_authz_svn.so from Mac OS Lion and put it into
/usr/libexec/apache2
Next, created com.site.svn.plist in /Library/Server/Web/Config/apache2/webapps:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>name</key> <string>com.site.svn</string> <key>includeFiles</key> <array> <string>/private/etc/apache2/svn_configs/svn_config.conf</string> </array> <key>requiredModuleNames</key> <array> <string>dav_svn_module</string> <string>authz_svn_module</string> </array> <key>sslPolicy</key> <integer>1</integer> </dict> </plist>
I've added LoadModule(s) for mod_dav_svn.so and mod_authz_svn.so into /Library/Server/Web/Config/apache2/httpd_server_app.conf:
LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so
I've created **/private/etc/apache2/svn_configs/svn_config.conf**:
<Location /svn/repo1> DAV svn AuthName "Subversion auth" SVNPath /Users/someUser/Repositories/Repo1Repo <Limit GET HEAD OPTIONS CONNECT POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> Require group repo1users </Limit> AuthType Basic Require group repo1users </Location>
I've executed from the terminal:
webappctl start com.site.svn
and after that I'm able to reach repo1 via https://site/svn/repo1
but when I'm trying to subversion checkout system gives me:
>>>svn co https://site/svn/repo1 Authentication realm: <https://site:443> UserWebDAV Gateway Password for 'someUser': svn: access to 'https://site/svn/repo1' forbidden
Do you have any clue why I have this situation ?
P.S. Rights for
/Users/someuser/Repositories /Users/someuser/Repositories/Repo1Repo /Users/someuser/Repositories/Repo1Repo/*
are 777, owner/group - _www:_www
I've used for it - I read http://www.themacosxserveradmin.com/2011/01/lion-server-and-svn.html and tried to integrate it to mountain lion.
Thank you for your thoughts.
回答1:
Spent few days dealing with the same issue. While my configuration is not exactly the same should be close enough to help you accomplish what you are trying to do. Was able to link the authentication issue to having WebDAV enabled for Wiki (in Server app). If you disable WebDAV support there things will start working. In my case I chose to simply create additional listener in Apache on custom port (8080 or 8443) and placed all my SVN-related configuration instructions there, so everything is localized in one place.
Good luck!
来源:https://stackoverflow.com/questions/12020382/setting-up-subversion-server-on-mac-os-mountain-lion-have-access-via-browser-b