【问题标题】:How can I set a github proxy for electron-builder configuration?如何为电子生成器配置设置 github 代理?
【发布时间】:2018-11-10 09:09:49
【问题描述】:

我在安全的封闭网络下工作,我的电子构建器依赖项无法更新/下载它们的依赖项,所以我需要在 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

【问题讨论】:

    标签: node.js npm electron electron-builder


    【解决方案1】:

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

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

    而不是

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

    从这里开始:

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

    【讨论】:

    • 谢谢鲍里斯!应用
    猜你喜欢
    • 2017-09-05
    • 2018-04-26
    • 2016-06-10
    • 2011-04-01
    • 1970-01-01
    • 2023-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多