开发者

Problem with connecting to CollabNet SVN remotely

I setup the basic Win32 CollabNet SVN Server 1.6.5-6 with all the default settings and Apache running on port 9999 . Also, I installed TortoiseSVN . Everything works fine with Tortoise and also with Eclipse as long as I use a FILE url such as: file:///C:/SVNRepository/ .

If I point Internet Exploder at http://localhost:9999 it gives me a http text message that says "It works!". When I try to connect with the url http://localhost:9999/svn the browser shows me the 4 root directories of C:\SVNRepository but they are not browseable directories. Pointing the browser to svn://localhost:9999/svn causes the browser to open Tortoise, which in turn locks up explorer.exe for 5 minutes until it times out.

What is wrong?


After deliberations, the answer turned out to be:

<Location /svn>
  DAV svn
  #SVNParentPath C:/NotUsed
  SVNPath "C:/SVNRepository"
  SVNListParentPath On开发者_如何学编程
  #Require valid-user
  #AuthType Digest
  AuthName "SVNRepository"
  #AuthUserFile "C:/Subversion Server/httpd/conf/svnauthfile"
</Location>


That you get a not found error when trying to open the repository in a web browser suggests that the url is wrong. From reading the readme for opencollab svn server it seems that the recommended url-prefix for repositories is /svn, so if you followed those recommendations your "CodeRoot" would be http://localhost:9999/svn/CodeRoot.

You should be able to confirm if that is the case by looking at the httpd.conf of apache, at the bottom of the file you should find something like

<Location /_url prefix here_>
   DAV svn
   #SVNParentPath C:\repositories
   SVNPath C:\repositories
</Location>

If you have only one repository and want to be able to access it through localhost/svn you should use SVNPath instead of SVNParentPath and point it to the full path of the repository. If you instead want multiple repositories to be available under /svn use SVNParentPath instead and point it at the directory containing all the svn repositories.


If you're trying to access your SVN repository via an Apache server, you should be using the URL specifying the http protocol: http://localhost:9999/something. The svn protocol is for use with the standalone svn server. The something part will depend on how Apache is configured (whatever Apache is expecting to map to the directory C:\SVNRepository).


subversion URLs starting with svn:// use subversions own protocol that is handled by svnserve. If you are using apache you're using the mod_dav_svn module for apache if configured correctly. When using apache for serving an svn repository you can also access the repository via any browser -- just type the URL in the browser and you'll see a rather simple representation of the file list. This is a really useful way to see if the repository is actually served. All URLs served via apache use the http protocol or its SSL variant https. As with any webserver, if you're using a non-standard port you need to specify it with the URL.


I've never used SVN with apache but shouldn't it be

http://localhost:9999

If accessing it through apache? I could see specifying the svn protocol might confuse tortoise when it tries to connect.

Also trying "telnet localhost 9999" to test the port is listening.

HTH.


Thats hard to tell, but most obviously there is something wrong with the apache configuration. For more precise answers you should post your concrete setup steps.

But besides installing all on your own, you should take a look on VisulaSVN Server. This is quite handy in a Windows environment (which you seem to work with). Its a complete SVN server and easy to configure via a simple GUI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜