Electron builder azure devops pipeline code signing certificate

OuiameNASSAR-9262 0 Reputation points
2023-06-07T14:46:55.5766667+00:00

Hello,

I have an issue when i run this command as an azure devops task : npm run build on my Electron JS desktop application, when i put my certificate in the Root store i get this error : SignTool Error: No certificates were found that met all the given criteria.

When i install the certificate in the MY store i get this error : Build failed: Error: Cannot find certificate CampanyName, all certs.

Electron builder generate this command :

C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0\windows-10\x64\signtool.exe sign /f yourcertificatefilename.pfx /p "PFXfilepassword” /tr [http://timestamp.sectigo.com] /td sha256 /fd sha256 "C:\path\to[FileToSign.exe"](http://filetosign.exe%22/)

When i try to run this command in the server it works, but in azure devops task it s not.

also the npm run build in my local works as well.

could anyone help me for this devops azure step ?

In my electron-builder config, i have this code :

 win: {
            icon: 'images/convert.ico', // Path to the ICO file for Windows
            publisherName: 'Sectigo Public Code Signing CA R36',
            certificateSubjectName: 'Campany name',
            certificateFile: 'Security/certificate.pfx',
            certificatePassword: p.certificatePassword,
            certificateSha1: p.certificateSha1,
        },
Community Center | Not monitored
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.