LuaRocks安装使用哪些网络协议?

我正在一个红帽子盒子上运行,它在一个公司的防火墙之后。我猜测一些协议被阻止了,但是我对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
点赞
用户1793220
用户1793220

LuaRocks 使用 LuaSocket 和 LuaSec 来执行 HTTP 和 HTTPS,但除此之外,它只是延迟到外部命令,如 git

您可以使用 --verbose 标志运行 luarocks,它将输出它调用的每个外部命令。然后,您可以检查它调用的 git 命令行,并直接从命令行尝试它。这应该有助于诊断是否有任何标志引起问题。

2015-03-06 01:12:39
用户3853826
用户3853826

作为解决方法,你可以用下面的命令强制 git 使用 https:

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

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

2016-03-09 18:20:25