如何修复“SignTool 错误:IStore2::Load 返回错误:0x80090345”

如何修复“SignTool 错误:IStore2::Load 返回错误:0x80090345”

我有一个 Jenkins 作业在远程节点上运行 signtool 实用程序,控制台日志如下所示:

Started by user anonymous
Building remotely on vm-builder
[VE] $ cmd /c call "C:\Documents and Settings\builder\hudson6959487656440210459.bat"
USERNAME=builder

d:\work\workspace\VE>d:\work\workspace\VE\CodeSign\signtool.exe sign /f d:\work\workspace\VE\CodeSign\Shunra.pfx /p "shunrail" /t http://timestamp.verisign.com/scripts/timstamp.dll /du "www.shunra.com" /v d:\work\workspace\VE\ShunraInstallationServices\lib\net\Release\ShunraInstallationServices.dll 

Number of files successfully Signed: 0

Number of warnings: 0

Number of errors: 1

SignTool Error: IStore2::Load returned error: 0x80090345

    The requested operation requires delegation to be enabled on the machine.

SignTool Error: An error occurred while attempting to load the signing

    certificate from: d:\work\workspace\VE\CodeSign\Shunra.pfx


d:\work\workspace\VE>exit 1 
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

注意USERNAME=builder输出中的行。这是我以交互方式登录远程计算机时使用的同一帐户,该计算机是运行在 Windows 7 机器上的 XP 虚拟机。当然,该帐户是本地管理员。

现在,从控制台窗口(从 RDP 会话)运行相同的 signtool 命令可以正常工作,但是当 Jenkins 尝试执行它时,我收到此委派错误消息。

另一条信息。相关进程树是:

bash.exe -c "cd d:\work && java -jar slave.jar"  # Jenkins remote execution through sshd on cygwin
  bash.exe
    java
      cmd   # Jenkins sent a request to the java agent to execute this Windows batch file
        signtool  # This is the signtool invocation

发生了什么事,为什么 signtool 突然抱怨这个委派的事情?

谢谢。

相关内容