Electron Builder代码签名下载证书错误

我正在构build一个Electron应用程序,并使用npm包电子构build器来构buildWindows的应用程序和安装程序。 我正在尝试使用CSC_LINKCSC_KEY_PASSWORD环境variables来签署应用程序,如下所述: https : //github.com/electron-userland/electron-builder#travis-appveyor-and-other-ci-servers

首先尝试错误和堆栈跟踪是:

 Unhandled rejection Error: unable to verify the first certificate at Error (native) at TLSSocket.<anonymous> (_tls_wrap.js:1065:38) at emitNone (events.js:80:13) at TLSSocket.emit (events.js:179:7) at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:593:8) at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:425:38) From previous event: at Object.downloadCertificate (C:\projects\presentation\Electron\node_modules\electron-builder\src\codeSign.ts:97:18) ... 

然后我尝试设置环境variablesNODE_TLS_REJECT_UNAUTHORIZED=0 ,现在得到一个不同的错误:

 Unhandled rejection Error: Request error, status 400: Bad Request at ClientRequest.<anonymous> (C:\projects\presentation\Electron\node_modules\electron-builder\src\httpRequest.ts:36:16) ... 

在电子构build器的httpRequest.ts中调用的特定行似乎只是使用Node的https模块: https.request(...) https://github.com/electron-userland/electron-builder/blob/master /src/httpRequest.ts#L28

这使我相信有一些Windows机器或证书。 我在Windows 10 5.9.0节点上运行。

不知道问题的根源是什么,但是我能够通过将文件移动到Dropbox来使所有的工作。 我仍然必须设置NODE_TLS_REJECT_UNAUTHORIZED=0CSC_LINK需要设置不带引号:

成功: SET CSC_LINK=https://www.dropbox.com/s/path/to/file.p12?dl=1

失败: SET CSC_LINK="https://www.dropbox.com/s/path/to/file.p12?dl=1"

关于电子制造商GitHub的问题讨论的链接可以在这里find: https : //github.com/electron-userland/electron-builder/issues/291

直接向https://github.com/electron-userland/electron-builder/issues提交问题以获得维护人员的回答最好&#x3002; 我是活跃的维护者,不检查SO,所以不太可能得到快速回答;)

如果问题仍然存在,文件问题:)