【问题标题】:Specifying the protocol to fetch a bower dependency指定协议以获取 bower 依赖项
【发布时间】:2016-03-03 09:05:30
【问题描述】:

我依赖 angular-jwt (https://github.com/auth0/angular-jwt)

在我的 bower.json 中有这个:

"dependencies": {
...
    "angular-jwt": "~0.0.9"

当我部署到无法通过 git 协议访问 github 的 Jenkins 构建机器时,我收到此错误:

[ERROR] bower angular-jwt#~0.0.9 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/auth0/angular-jwt.git", 

#128 的退出代码致命:无法连接到 github.com: github.com[0: 192.30.252.128]: errno=Connection denied

那么是否可以告诉 Bower 使用 https 而不是 git 协议? 或者明确指定要获取某个依赖项的存储库?

【问题讨论】:

    标签: angularjs git jenkins bower jwt


    【解决方案1】:

    你必须配置 git 以在你的构建机器上使用这样的 https 协议:

    git config --global url."https://".insteadOf git://
    

    【讨论】:

    • 谢谢,但在我的上下文中,我无法访问这台机器。
    猜你喜欢
    • 2016-08-01
    • 2013-10-21
    • 2013-08-18
    • 2013-02-02
    • 2014-10-26
    • 2013-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多