Failing to sign nuget package - Keyset does not exist

Hello,

I’m using the Windows executer as a part of my workflow to build, sign and deploy a NuGet package.

When running a variation of the following command:
nuget.exe sign .\my-unsigned.nupkg -CertificatePath .\nuget-signing-cert.p12 -CertificatePassword -Timestamper http://timestamp.comodoca.com

I’m getting this error before it returns:
“Keyset does not exist”

Doing the exact same thing on a local Windows VM works just fine and ends with: “Package(s) signed successfully”

I’m not sure, but my guess is that it’s somehow relates to system permissions.
Would appreciate anyone’s help!

I have the same problem but it only occurs in the loop signing the packages on the second, third, etc. package in a PowerShell script. Before the loop the certificate is installed via command:

# register the certificate to the CI image..
$certpw=ConvertTo-SecureString $Env:PFX_PASS –asplaintext –force 
Import-PfxCertificate -FilePath "C:\vpksoft.pfx" -CertStoreLocation Cert:\LocalMachine\My -Password $certpw | Out-Null