WebSVN 与 VisualSVN Server,有人获得身份验证才能工作吗?

发布于 2024-07-04 08:18:30 字数 824 浏览 8 评论 0原文

我在 Windows 服务器上安装了 VisualSVN Server,为多个存储库提供服务。

由于 VisualSVN 服务器内置的 Web 查看器是一个简约的颠覆浏览器,因此我想安装 WebSVN我的存储库的顶部。

然而,问题是我似乎无法进行身份验证。 理想情况下,我希望 VisualSVN 中指定的当前存储库身份验证能够与 WebSVN 一起使用,这样虽然我在 WebSVN 中看到所有存储库名称,但如果没有正确的凭据,我实际上无法浏览它们。

通过访问 此 google 上最顶部链接的缓存副本查询你可以看到我到目前为止发现的看起来很有希望的内容。
(博客主页面似乎已被破坏,我指的最上面页面的域是 the-wizzard.de)

在那里我发现了一些 php 函数,我可以将其附加到 WebSVN 中的一个 php 文件上。 我遵循了那里的修改,但我成功做的只是让 WebSVN 要求我输入用户名和密码,无论我输入什么,它都不会让我进入。

不幸的是,php 和 apache 对我来说很大程度上是黑魔法。

那么,有人成功地将 WebSVN 与 VisualSVN 托管存储库集成吗?

I have a VisualSVN Server installed on a Windows server, serving several repositories.

Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install WebSVN on top of my repositories.

The problem, however, is that I can't seem to get authentication to work. Ideally I'd like my current repository authentication as specified in VisualSVN to work with WebSVN, so that though I see all the repository names in WebSVN, I can't actually browse into them without the right credentials.

By visiting the cached copy of the topmost link on this google query you can see what I've found so far that looks promising.
(the main blog page seems to have been destroyed, domain of the topmost page I'm referring to is the-wizzard.de)

There I found some php functions I could tack onto one of the php files in WebSVN. I followed the modifications there, but all I succeeded in doing was make WebSVN ask me for a username and password and no matter what I input, it won't let me in.

Unfortunately, php and apache is largely black magic to me.

So, has anyone successfully integrated WebSVN with VisualSVN hosted repositories?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

寒江雪… 2024-07-11 08:18:30

我正在使用 VisualSVN Server,并且刚刚安装完 Trac。 我的目标是获得一个更好的基于 Web 的存储库浏览器,而 Trac 绝对是我见过的 Subversion 中最好的浏览器之一。 去http://www.visualsvn.com/server/trac/安装真是非常简单。 是的,Trac 有一个票务跟踪和一个 wiki 系统,您可能不会寻找这些系统,但是存储库和日志浏览器将其出售给我。

现在,我发现可以通过简单地附加

[components]
trac.ticket.* = disabled
trac.wiki.* = disabled

到 trac.ini 配置文件的末尾来禁用 Trac 附带的 wiki 和票证跟踪系统。 这会导致 wiki 的起始页抛出无法找到 wiki 模块的错误,因此您必须通过添加以下内容再次编辑 trac.ini,将 Trac 设置为在启动时使用时间轴(日志视图)或存储库浏览器打开[trac] 标题下的以下内容:

对于日志时间线作为默认

default_handler = TimelineModule

对于存储库浏览器作为默认

default_handler = BrowserModule

I'm using VisualSVN Server and I just got done installing Trac. My goal was to get a better web-based repository browser, and Trac is definitely one of the better ones I've seen for Subversion. Go to http://www.visualsvn.com/server/trac/ installation is really quite straightforward. Yes, Trac has a ticket tracking and a wiki system, which you may not be looking for, but the repository and log browser sell it for me.

Now, I have found that it is possible to disable the wiki and ticket tracking systems that come with Trac through simply appending

[components]
trac.ticket.* = disabled
trac.wiki.* = disabled

to the end of the trac.ini configuration file. This causes the start page of the wiki to throw an error that the wiki module cannot be found so you have to set Trac to open with either the Timeline (log view) or Repository Browser on startup by editing the trac.ini again by adding the following under the [trac] heading:

for the log timeline as default

default_handler = TimelineModule

for the repository browser as default

default_handler = BrowserModule
温柔一刀 2024-07-11 08:18:30

我是你提到的那篇文章的作者。 我发布的信息仅适用于在 IIS 上运行的 WebSVN。 据我了解,当您在 Apache 上使用 PHP 时,该软件应该“正常工作”,尽管我从未在该环境中设置过它。 您是否尝试过进行一些“回显”调试(由于缺乏更好的术语)来查看身份验证到底在哪里失败?

I am the author of the article you mentioned. The information I published was only meant for WebSVN running on IIS. It is my understanding that the software should "just work" when you use PHP on Apache, although I have never set it up in that environment. Have you tried doing some "echo"-debugging (for the lack of a better term) to see where exactly the authentication fails?

蹲在坟头点根烟 2024-07-11 08:18:30

如果您正在寻找一款比默认浏览器功能更丰富的基于 Web 的存储库浏览器,并且您使用 VisualSVN Server,请升级到 VisualSVN Server 3.2 或更高版本。

VisualSVN Server 具有丰富的 Subversion 存储库 Web 界面。 与 WebSVN 不同,VisualSVN Server 的内置 Web 客户端开箱即用,不需要管理员执行任何配置任务。

您可以在此处查看现场演示:http://demo-server.visualsvn.com/ !/

VisualSVN 服务器中的 Subversion Web 用户界面

If you are looking for a web-based repository browser which is more feature-rich than the default one and you use VisualSVN Server, then upgrade to VisualSVN Server 3.2 or newer.

VisualSVN Server has a rich web interface for Subversion repositories. Unlike WebSVN, VisualSVN Server's built-in web client works out of the box and does not require an administrator to perform any configuration tasks.

You can see the live demo here: http://demo-server.visualsvn.com/!/

Subversion web user interface in VisualSVN Server

愁杀 2024-07-11 08:18:30

我让它与 Windows 身份验证(实际上是 AuthType VisualSVN)一起使用。技巧是注释掉 svn auth 并将其替换为主配置文件中找到的相同类型的身份验证文本。 感谢安东尼·约翰逊制定了所有其他细节。

# For PHP 5 do something like this:
LoadModule php5_module "F:/wamp/bin/php/php5.3.0/php5apache2_2.dll"
AddType application/x-httpd-php .php


# configure the path to php.ini
PHPIniDir "f:/wamp/bin/php/php5.3.0/"

<IfModule dir_module>
   DirectoryIndex index.html index.php 
</IfModule>

#Alias /websvn/ "F:/Program Files/VisualSVN Server/htdocs/websvn-2.3.1/" 

<Location /websvn-2.3.1/>
   Options FollowSymLinks

    AuthName "Subversion Repositories"
    AuthType VisualSVN
    AuthzVisualSVNAccessFile "F:/Repositories/authz-windows"
    AuthnVisualSVNBasic on
    AuthnVisualSVNIntegrated off
    AuthnVisualSVNUPN Off
   Require valid-user


   SVNListParentPath on
   SVNParentPath "f:/Repositories/"
</Location>

I got this to work with windows authentication (which is actually AuthType VisualSVN) The trick is to comment out the svn auth and replace it with the same sort of auth text found in the main config file. Thanks to Anthony Johnson for working out all the other details.

# For PHP 5 do something like this:
LoadModule php5_module "F:/wamp/bin/php/php5.3.0/php5apache2_2.dll"
AddType application/x-httpd-php .php


# configure the path to php.ini
PHPIniDir "f:/wamp/bin/php/php5.3.0/"

<IfModule dir_module>
   DirectoryIndex index.html index.php 
</IfModule>

#Alias /websvn/ "F:/Program Files/VisualSVN Server/htdocs/websvn-2.3.1/" 

<Location /websvn-2.3.1/>
   Options FollowSymLinks

    AuthName "Subversion Repositories"
    AuthType VisualSVN
    AuthzVisualSVNAccessFile "F:/Repositories/authz-windows"
    AuthnVisualSVNBasic on
    AuthnVisualSVNIntegrated off
    AuthnVisualSVNUPN Off
   Require valid-user


   SVNListParentPath on
   SVNParentPath "f:/Repositories/"
</Location>
小霸王臭丫头 2024-07-11 08:18:30

我使用 VisualSVN 服务器进行了 WebSVN 身份验证,尽管我自己进行了大量的黑客/试错定制。

我是这样做的:

  1. 如果您还没有安装 PHP,请通过下载 zip 文件并查看在线 PHP 手动安装说明来手动安装 PHP。 我将 PHP 安装到了 C:\PHP

  2. 将 websvn 文件夹解压到 C:\Program Files\VisualSVN Server\htdocs\

  3. 完成配置 websvn 目录的步骤,即将 configdist.php 重命名为 config 等。我的存储库位于 C:\SVNRepositories 中,因此为了配置身份验证文件,我将 config.php 行设置为: $config-> ;useAuthenticationFile('C:/SVNRepositories/authz'); // 全局访问文件

  4. 将以下内容添加到 C:\Program Files\VisualSVN Server\conf\httpd-custom.conf :

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php


# configure the path to php.ini
PHPIniDir "C:/php"

<IfModule dir_module>
   DirectoryIndex index.html index.php 
</IfModule>

<Location /websvn/>
   Options FollowSymLinks
   AuthType Basic
   AuthName "Subversion Repository"
   Require valid-user
   AuthUserFile "C:/SVNRepositories/htpasswd"
   AuthzSVNAccessFile "C:/SVNRepositories/authz"
   SVNListParentPath on
   SVNParentPath "C:/SVNRepositories/"
</Location>

这对我有用,websvn 只会显示那些为给定用户授权的目录。 请注意,为了使其正常工作,您必须向每个人提供“主级别”访问权限,然后禁用某些用户对某些子目录的访问权限。 例如,我有一个用户没有主级别访问权限,但可以访问子级别。 不幸的是,这个人在 websvn 中看不到任何内容,即使他直接链接到 filedetails.php 以获得他有权查看的文件。 就我而言,这不是什么大问题,因为我无论如何都不希望他访问 websvn,但这是您想知道的事情。

另外,这会将服务器设置为 ssl 连接,因此一旦设置完毕,地址将是 https:// 地址,而不是常规的 http:// 地址。

I got WebSVN authentication working with VisualSVN server, albeit with a lot of hacking/trial-error customization of my own.

Here's how I did it:

  1. If you haven't already, install PHP manually by downloading the zip file and going through the online php manual install instructions. I installed PHP to C:\PHP

  2. Extract the websvn folder to C:\Program Files\VisualSVN Server\htdocs\

  3. Go through the steps of configuring the websvn directory, i.e. rename configdist.php to config, etc. My repositories were located in C:\SVNRepositories, so to configure the authentication file, I set the config.php line so: $config->useAuthenticationFile('C:/SVNRepositories/authz'); // Global access file

  4. Add the following to C:\Program Files\VisualSVN Server\conf\httpd-custom.conf :

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php


# configure the path to php.ini
PHPIniDir "C:/php"

<IfModule dir_module>
   DirectoryIndex index.html index.php 
</IfModule>

<Location /websvn/>
   Options FollowSymLinks
   AuthType Basic
   AuthName "Subversion Repository"
   Require valid-user
   AuthUserFile "C:/SVNRepositories/htpasswd"
   AuthzSVNAccessFile "C:/SVNRepositories/authz"
   SVNListParentPath on
   SVNParentPath "C:/SVNRepositories/"
</Location>

This worked for me, and websvn will only show those directories that are authorized for a given user. Note that in order for it to work right, you have to provide "Main Level" access to everybody, and then disable access to certain sub-directories for certain users. For example, I have one user who doesn't have main level access, but does have access to a sub-level. Unfortunately, this person can't see anything in websvn, even if he links directly to filedetails.php for a file he's authorized to see. In my case it's not a big deal because I don't want him accessing websvn anyway, but it's something you'll want to know.

Also, this sets the server up for an ssl connection, so once you've set it up, the address will be and https:// address, not the regular http://.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文