使用 SharpSVN 进行 SVN 存储库身份验证
谁能告诉我如何使用 SharpSVN 库对存储库的用户(SVN 用户)进行身份验证。 该存储库只能由这些用户提交。 谢谢
Can any one tell me how to authenticate users(SVN users) for a repository using SharpSVN Library.
That repository should only be committed by those users.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 SVNClient 的 Authenticate 属性:
Use the Authenticate properties of
SVNClient
:对于那些不想破坏默认凭据的人(如果您在同一台计算机上运行 TortoiseSVN)。
For those of you who don't want to blow away your default credentials (if you're running TortoiseSVN on the same machine).
您还可以通过向
SslServerTrustHandlers
添加事件处理程序来覆盖 SSL 证书错误,如下所示:You can also override SSL certificate errors by adding an event handler to
SslServerTrustHandlers
like this:就我而言,SVN 服务器运行的是 VisualSVN Server 3.5.3,并启用了集成 Windows 身份验证。使用 SharpSvn 1.9004.3879.127,即使我配置了用户名和密码,SVN 客户端也尝试使用 Windows 身份验证:
当应用程序代码由无权访问存储库的 Windows 用户运行时,这会导致以下错误:
我修复了此问题通过仅允许
basic
和digest
身份验证:In my case, the SVN server was running VisualSVN Server 3.5.3 with Integrated Windows Authentication enabled. Using SharpSvn 1.9004.3879.127, the SVN client tried to use Windows authentication even when I configured it with a username and password:
This resulted in the following error when the application code was run by a Windows user that didn't have access to the repository:
I fixed this by only allowing
basic
anddigest
authentication: