1

我正在尝试在 Jenkins 作业中运行 svn2git 以定期将 Git 存储库与其在本地服务器上的 SVN 目录同步。

作业失败并输出以下消息

C:\GitDirectory>svn2git --rebase 
command failed:
2>&1 git svn fetch
Error validating server certificate for 'https://machinename:8443':
 - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: machinename
 - Valid: from Nov 19 09:07:49 2008 GMT until Nov 17 09:07:49 2018 GMT
 - Issuer: machinename
 - Fingerprint: 53:ba:1d:75:fd:0c:cd:7e:87:24:93:ba:28:32:11:2c:a9:8e:a6:b7
Certificate problem.
(R)eject, accept (t)emporarily or accept (p)ermanently? RA layer request failed: PROPFIND request failed on '/svn/directory': PROPFIND of '/svn/directory': Server certificate verification failed: issuer is not trusted (https://machinename:8443) at /usr/lib/perl5/site_perl/Git/SVN.pm line 148

Jenkins 在 Windows 中以本地管理员用户帐户运行。

我已经使用同一个帐户通过命令提示符运行 svn2git --rebase 并永久接受了证书。

命令提示符中的后续 svn2git --rebase 不会引发此消息,但是当我尝试通过 Jenkins 作业运行 svn2git 时仍然收到该消息。

关于如何让詹金斯永久接受这个证书的任何想法?

4

1 回答 1

1

那是因为svn2git无法处理证书未在您的服务器中被接受的情况。在您的服务器中安装该证书或使用svn2gitnet,它可以正确处理证书问题。

于 2017-09-23T13:06:19.263 回答