【问题标题】:What network protocols does luarocks install use?luarocks 安装使用哪些网络协议?
【发布时间】:2015-05-07 03:17:01
【问题描述】:

我在公司防火墙后面的红帽盒子上运行。我猜有些协议被阻止了,但我是 git 的新手,这是我第一次使用 luarocks。在我看来 luarocks 正在尝试使用 https:// 所以应该没有防火墙问题....但是错误消息暗示防火墙问题。

这是我所知道的:

我知道这个 git 命令在我的机器上运行良好。 git 可以在本地克隆存储库,我可以从源代码构建 luarocks。

git clone https://github.com/torch/luajit-rocks.git

但是,这个命令失败了:

luarocks install cwrap

这是命令的输出

Installing https://raw.githubusercontent.com/torch/rocks/master/cwrap-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/cwrap-scm-1.rockspec... switching to 'build' mode
Initialized empty Git repository in /tmp/luarocks_cwrap-scm-1-8589/cwrap/.git/
github.com[0: 192.30.252.129]: errno=Connection timed out

【问题讨论】:

    标签: luarocks


    【解决方案1】:

    LuaRocks 在可用时使用 LuaSocket 和 LuaSec 来执行 HTTP 和 HTTPS,但除此之外它只是遵循外部命令,例如 git。 您可以使用--verbose 标志运行luarocks,它将输出它调用的每个外部命令。然后您可以检查它正在调用的git 命令行是什么,并直接从命令行尝试。这应该有助于诊断是否有任何标志导致问题。

    【讨论】:

      【解决方案2】:

      作为一种解决方法,您可以通过以下命令强制 git 使用 https:

      git config --global url.https://github.com/.insteadOf git://github.com/
      

      来源:https://github.com/torch/rocks/issues/38

      【讨论】:

        猜你喜欢
        • 2018-08-24
        • 1970-01-01
        • 1970-01-01
        • 2011-06-21
        • 2014-08-25
        • 2013-08-03
        • 2018-08-10
        • 2021-06-21
        • 2013-12-14
        相关资源
        最近更新 更多