0

我在公司防火墙后面的红帽盒子上运行。我猜有些协议被阻止了,但我是 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
4

2 回答 2

2

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

于 2015-03-06T01:12:39.057 回答
2

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

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

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

于 2016-03-09T18:20:25.017 回答