在 SVN 中如何覆盖自动 Windows 域身份验证 [英] In SVN how do I override automatic Windows domain authentication

查看:25
本文介绍了在 SVN 中如何覆盖自动 Windows 域身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个不属于 Windows 域的构建服务器,它试图通过 apache 连接到运行 HTTPS 的 VisualSVN 服务器,并通过 Active Directory 进行域登录.当我尝试使用指定域用户名连接到服务器时,我观察到客户端挂起:

svn ls --username=domainuser https://subversion.mydomain/svn/repo1/

服务器上的日志使用构建机器的登录名和域名字段中的构建机器的主机名显示 Windows 身份验证失败.命令行中提供的用户名将被完全忽略.

SVN 客户端:TortoiseSVN 命令行工具:svn,版本 1.8.1 (r1503906)

在一台单独的机器上(在域上) - 我发现如果我使用 cygwin svn , --username 不会被忽略.

解决方案

我找到的解决方案是禁用 http-auth-type 'negotiate'.这可以防止自动共享 Windows 凭据.

我使用命令行覆盖验证了这一点,它在命令行上要求用户输入密码:

svn ls --username=domainuser --config-option servers:global:http-auth-types=basic;digest https://subversion.mydomain/svn/repo1/认证领域:视觉SVN服务器域用户"的密码:

(Cygwin 用户注意事项:如果您通过 Cygwin 在 Windows 下使用 SVN,那么您需要在命令中添加引号,如下所示:$ svn ls --username=domainuser --config-option "servers:global:http-auth-types=basic;digest" https://subversion.mydomain/svn/repo1/ -- 否则分号将被视为命令分隔符.)

要更永久地配置它,您可以为所有匹配的服务器创建一个 servers 配置文件条目.对于 Win7,它是 C:UsersAppDataRoamingSubversionservers.

[组]mydomain = *.mydomain[我的域名]http-auth-types=basic;digest

I have a build server that is not part of a Windows domain trying to connect to a VisualSVN server running HTTPS via apache with domain login via Active Directory. When I try to connect to the server using specifying a domain username I observe a client hang:

svn ls --username=domainuser https://subversion.mydomain/svn/repo1/

The logs on the server show Windows authentication failures using the login-name for the build-machine, and the build-machine's hostname in the Domain name field. The username provided on the command-line is completely ignored.

SVN Client: TortoiseSVN commandline tools: svn, version 1.8.1 (r1503906)

On a separate machine (on the domain) - I found that the --username would not be ignored if I used the cygwin svn instead.

解决方案

The solution I found was to disable the http-auth-type 'negotiate'. This prevents Windows credentials being automatically shared.

I verified this using a command-line override, it asked for password for the user on the command-line:

svn ls --username=domainuser --config-option servers:global:http-auth-types=basic;digest https://subversion.mydomain/svn/repo1/
Authentication realm: <https://subversion.mydomain/svn/repo1/> VisualSVN Server
Password for 'domainuser': 

(Note for Cygwin users: If you use SVN under Windows via Cygwin then you will need to add quotes to your command like this: $ svn ls --username=domainuser --config-option "servers:global:http-auth-types=basic;digest" https://subversion.mydomain/svn/repo1/ -- Otherwise the semicolon will be treated as a command delimiter.)

To configure this more permanently you can make a servers config file entry for all matching servers. For Win7 that's C:Users<User>AppDataRoamingSubversionservers.

[groups]
mydomain = *.mydomain

[mydomain]
http-auth-types=basic;digest

这篇关于在 SVN 中如何覆盖自动 Windows 域身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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