Home » 未分类 » 解决办法:VisualSVN hooks更新SVN的时候报证书错误

解决办法:VisualSVN hooks更新SVN的时候报证书错误

 

hooks svn Server certificate verification failed issuer is not trusted ,解决办法:以System身份启动CMD,然后跑一遍svn up,把证书缓存起来。zheng-chang-dai-quad3

D:JenkinsjobsMerge Trunk to Stableworkspacestable>svn up --trust-server-cert --non-interactive 
 Updating '.':
 svn: E175002: Unable to connect to a repository at URL 'https://xxx/stable'
 svn: E175002: OPTIONS of 'https://xxx/stable': Server certificate verification failed: certificate issued for a different hostname,  issuer is not trusted (https://xxx)


Pretty old question, but still quite alive.

As you know, the problem is that the accepted certificate cache (as well as the username/password cache) is per-user, and since Jenkins is running as a different user (most likely SYSTEM), it has no idea of your regular user cache.

Not all SVN clients let you do the “echo p” thing there (it didn’t work for me), and the --trust-server-cert apparently doesn’t work in this case either.

What worked for me was to open a console window as SYSTEM, and do the interactive acceptcertificate-login-password dance in there.

Since all of this is cached, you only need to do this once, and from then on, all svn up and similar requests will work.

如何以SYSTEM用户启动一个CMD程序,open a console window as SYSTEM



    分享到: