简体   繁体   English

SVN结帐自动化领域密码绕过

[英]SVN checkout automation realm password bypass

I'm trying to automate a SVN checkout within Powershell so there are no prompts: 我正在尝试在Powershell中自动执行SVN检出,因此没有提示:

svn --non-interactive --trust-server-cert --username foo --password bar checkout https://www.whatever.net/svn/something

But I get the error message: 但是我收到错误消息:

svn: E170013: Unable to connect to a repository at URL ' https://www.whatever.net/svn/something ' svn: E230001: Server SSL certificate verification failed: certificate issued for a different hostname, issuer is not trusted SVN:E170013:无法在URL连接到存储库“ https://www.whatever.net/svn/something ”的svn:E230001:服务器SSL证书验证失败:对于不同的主机名颁发的证书,发行人不被信任

If I do it manually (w/ prompt) it asks me for a realm password and the rest of the data, and after that I can checkout no problem. 如果我手动进行操作(带有提示),它将要求我提供领域密码和其余数据,然后我可以签出任何问题。 I am doing this on a Windows 10 Azure VM. 我正在Windows 10 Azure VM上执行此操作。

I suspect this is due to realm login - how do I automate this/bypass it with Powershell scripts? 我怀疑这是由于领域登录引起的-如何使用Powershell脚本自动执行此操作/绕过它?

Solved it. 解决了。 The command I've posted was fine. 我发布的命令很好。 What was the problem was the certification of the Visual SVN server. 问题出在Visual SVN服务器的认证上。 It used a self signed cert, and that was no good. 它使用了一个自签名证书,这不好。 Changed it to a signed certificate and now it works as it should. 将其更改为签名证书,现在可以正常工作了。

I used the following code to checkout a Tortoise SVN repository. 我使用以下代码检出Tortoise SVN存储库。

#Download a local copy of the SVN Repository
#Wait for command to finish before moving forward
$SVNDownloadJob = Start-Job {TortoiseProc.exe /command:update /path:"C:\SVN_Repo" /closeonend:1 | Out-Null} 
Wait-Job $SVNDownloadJob
Receive-Job $SVNDownloadJob

Have you tried this? 你有尝试过吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM