如何为电子构建器配置设置github代理?

时间:2018-05-31 11:05:20

标签: node.js npm electron electron-builder

我在安全的封闭网络下工作,我的电子生成器依赖项依赖项不能更新/下载它们的依赖项所以我需要在代理后面工作github才能下载它们, 但我不知道在哪里设置它,

    13:30:09][Step 12/15] > electron-builder --win --x64
[13:30:09][Step 12/15] 
[13:30:10][Step 12/15]   • electron-builder version=20.8.1
[13:30:10][Step 12/15]   • artifacts will be published if draft release exists reason=CI detected
[13:30:11][Step 12/15]   • loaded configuration file=D:\BuildAgent\work\4247f9413726d058\electron-builder.json
[13:30:11][Step 12/15]   • description is missed in the package.json appPackageFile=D:\BuildAgent\work\4247f9413726d058\package.json
[13:30:11][Step 12/15]   • author is missed in the package.json appPackageFile=D:\BuildAgent\work\4247f9413726d058\package.json
[13:30:20][Step 12/15]   • no native production dependencies
[13:30:21][Step 12/15]   • packaging       platform=win32 arch=x64 electron=1.8.4 appOutDir=app-builds\win-unpacked
[13:30:55][Step 12/15]   • downloading               path=D:\BuildAgent\temp\buildTmp\electron-builder-cache\winCodeSign\winCodeSign-2.0.0 url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.0.0/winCodeSign-2.0.0.7z
[13:30:55][Step 12/15]   ⨯ Get https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.0.0/winCodeSign-2.0.0.7z: proxyconnect tcp: tls: oversized record received with length 20527

1 个答案:

答案 0 :(得分:1)

您提到您的构建版本在代理服务器后面运行,因此请在代理地址中尝试使用http而不是https:

导出HTTPS_PROXY =" http ://myproxy.com:8080"

而不是

导出HTTPS_PROXY =" https ://myproxy.com:8080"

从这里开始:

https://github.com/jspm/github/issues/59