【问题标题】:Downloading Stencil behind corporate proxy在公司代理后面下载 Stencil
【发布时间】:2019-08-17 03:13:32
【问题描述】:

我正在尝试启动我的第一个 Stencil 项目并看到此错误:

 Cannot download "https://github.com/ionic-team/stencil- 
 component-starter/archive/master
 .zip"
 Check your internet connection

 Error: connect ETIMEDOUT"

我的 git config 和 npm config http 和 https 代理设置都正确指向我的代理 url,但我仍然收到此错误。为什么?

感谢您提供任何有用的提示。

【问题讨论】:

    标签: javascript git npm stenciljs


    【解决方案1】:

    我在工作中也有同样的限制。

    发送curl -kvL,这将使您了解实际被阻止的内容:

    curl -kvL https://github.com/go-gitea/gitea/releases/download/v1.9.1/gitea-1.9.1-windows-4.0-amd64.exe.xz
    ...
    CONNECT github-production-release-asset-2e65be.s3.amazonaws.com:443 HTTP/1.1
    ...
    HTTP/1.1 403 Forbidden
    

    在企业环境中通常被阻止的是s3.amazonaws.com。

    【讨论】:

    • 感谢您的提示。我尽可能长时间地使用它,然后切换到使用 Lit。
    【解决方案2】:

    您可以直接通过您的代理卷曲相同的 zip 吗?

    curl -x http://proxy_server:proxy_port --proxy-user username:password -L "https://github.com/ionic-team/stencil-component-starter/archive/master.zip"
    

    【讨论】:

    • 没用。我只需要面对我的公司阻止 Github 上传/下载的事实。无论如何,谢谢。
    猜你喜欢
    • 1970-01-01
    • 2016-04-10
    • 1970-01-01
    • 2019-10-15
    • 2014-10-28
    • 2012-08-05
    • 2015-04-23
    • 2015-06-20
    • 1970-01-01
    相关资源
    最近更新 更多