简体   繁体   English

SVN - 从提交后挂钩中不受信任的服务器SSL证书

[英]SVN - Server SSL certificate untrusted from post-commit hook

I'm trying to create a post-commit.bat script so that every time someone commits, a working copy automatically updates. 我正在尝试创建一个post-commit.bat脚本,以便每次有人提交时,工作副本会自动更新。 This is my post-commit.bat: 这是我的post-commit.bat:

"C:\Program Files\TortoiseSVN\bin\svn.exe" update C:\Temp\PROD --non-interactive --trust-server-cert --username admin --password myPassword

This is the error message I'm getting: 这是我收到的错误消息:

svn: E230001: Unable to connect to a repository at URL
'https://svn.mydomain.com/svn/prod/trunk'
svn: E230001: Server SSL certificate untrusted

It looks like the --trust-server-cert option is ignored for some reason. 看起来像--trust-server-cert选项由于某种原因被忽略。 Interestingly, calling the batch file from cmd window works fine. 有趣的是,从cmd窗口调用批处理文件工作正常。

I'm using Subversion Edge server and TortoiseSVN client on Windows Server 2008. 我在Windows Server 2008上使用Subversion Edge服务器和TortoiseSVN客户端。

Anybody has any ideas what I'm doing wrong? 任何人都有任何想法,我做错了什么? Any help would be appreciated. 任何帮助,将不胜感激。

LEC LEC

In my case (SVN client 1.8.1) the --trust-server-cert flag did also not work. 在我的情况下(SVN客户端1.8.1) --trust-server-cert标志也不起作用。 After finding this http://mail-archives.apache.org/mod_mbox/subversion-users/201308.mbox/%3CCABw-3Ye6rk-zwjM7jZL-zPvSDDeH=+1ebH9O0e5163rZETOG9A@mail.gmail.com%3E I upgraded to SVN 1.8.4 and the script works well. 找到这个http://mail-archives.apache.org/mod_mbox/subversion-users/201308.mbox/%3CCABw-3Ye6rk-zwjM7jZL-zPvSDDeH=+1ebH9O0e5163rZETOG9A@mail.gmail.com%3E后,我升级到了SVN 1.8。 4,脚本运行良好。 The --trust-server-cert flag is fixed. --trust-server-cert标志是固定的。

I have fixed this by issuing new certificate with Common Name (CN) equal to server name. 我通过发布与公共名称(CN)等于服务器名称的新证书来解决这个问题。

I was able to use certificate with CN server name mismatch from browsers (with warnings) and svn command line. 我能够使用证书与浏览器(带警告)和svn命令行的CN服务器名称不匹配。 But was not able to use certificate within batch file which is called from Jenkins . 但是无法在Jenkins调用的批处理文件中使用证书。

I use SVN client 1.8.1 under Win32. 我在Win32下使用SVN客户端1.8.1。

I have also tried before, but it does not helped: 我之前也尝试过,但它没有帮助:

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

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