使用 SVN 和 HTTP 协议访问 SVN 存储库的问题 [英] Issue Accessing SVN Repository with Both SVN and HTTP Protocols

查看:49
本文介绍了使用 SVN 和 HTTP 协议访问 SVN 存储库的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 HTTP 协议访问我在本地计算机上创建(使用 svnadmin)的 SVN 存储库,但我无法确定 URL.是否需要提供其他配置才能以 HTTP 方式访问它?我使用 SVN 协议访问它没有问题.我只想做一些性能调整并比较协议.有任何想法吗?用于创建 repo 的命令如下.

I'm trying to access a SVN repository that I created (using svnadmin) on my local machine using the HTTP protocol, but I can't determine the URL. Is there additional configuration I need to supply to access it as HTTP? I have no issues accessing it using SVN protocol. I just want to do some performance tuning and compare the protocols. Any ideas? Commands used to create repo are below.

存储库创建和服务器启动命令:

$cd
$svnadmin create my-repository
$svnserve -d -r /Users/myusername

SVN:

$ svn info svn://localhost/my-repository
Path: my-repository
URL: svn://localhost/my-repository
Relative URL: ^/
Repository Root: svn://localhost/my-repository
Repository UUID: 2de7b13c-0139-45f6-a121-4d8cc6918849
Revision: 86
Node Kind: directory
Last Changed Rev: 86
Last Changed Date: 2013-12-04 11:58:03 -0800 (Wed, 04 Dec 2013)

HTTP:

$ svn info http://localhost/my-repository
svn: E120108: Unable to connect to a repository at URL 'http://localhost/my-repository'
svn: E120108: Error running context: The server unexpectedly closed the connection.

推荐答案

您需要 使用 mod_dav_svn 设置 Apache httpd.

一般来说 svnserve 会比 httpd 快.httpd 更受欢迎,因为最初 svnserve 不支持加密,除了通过 ssh 隧道(现在通过 SASL 支持)并且它不支持几乎那么多的身份验证方法(再次支持 SASL 改变了这一点).

In general svnserve will be faster than httpd. httpd is more popular because originally svnserve didn't support encryption except through ssh tunnels (it does now via SASL) and it didn't support nearly as many authentication methods (again SASL support changed this).

httpd 唯一一个 svnserve 没有的主要功能是能够直接使用 Web 浏览器浏览存储库(请注意,这与使用 viewvc 浏览不同).

The only major feature that httpd has that svnserve doesn't is the ability to browse the repositories with a web browser directly (Note that this isn't the same as say browsing with viewvc).

httpd 的一个好处是,由于它使用 HTTP,它通常无需特殊配置即可通过防火墙.它也可以被代理(允许使用缓存代理来帮助加快速度).

One benefit of httpd is that since it uses HTTP it generally goes through firewalls without special configuration. It can also be proxied (allowing for a caching proxy to help speed it up).

这篇关于使用 SVN 和 HTTP 协议访问 SVN 存储库的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆