1

我已经为 Windows 安装了 GitStack,它说我必须使用git clone [ip/domain]/myproject.git

但是,我在一个防火墙环境中,端口 9418 被阻止。443 和 22 端口似乎也被封锁了。我希望能尽快获得开放它们的许可。

但与此同时,有没有办法可以利用端口 80?也许甚至在特定的 url 上设置一个网站,通过端口 80 传输 git 协议?

我真的不确定为什么 Git 有自动使用 443 和 9418 的选项,但没有端口 80?

这样我网络上的某个人就可以连接到那个 url,它只是代理 git 协议?

我试过(显示端口被阻塞):

curl http://[myip]:9418
exit code (7) no error.

我试过使用以下,但我不认为端口 443 工作:

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

我什至无法通过此网络上的端口 9418 连接到我自己的计算机:

curl http://127.0.0.1:9418 -v

* About to connect() to 127.0.0.1 port 9418 (#0)
*   Trying 127.0.0.1...
* Adding handle: conn: 0x22e02a8
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x22e02a8) send_pipe: 1, recv_pipe: 0
* Connection refused
* Failed connect to 127.0.0.1:9418; No error
* Closing connection 0
curl: (7) Failed connect to 127.0.0.1:9418; No error

EDITTTTT:好吧,事实证明,如果你使用 git clone http://[IP]:80/project.git它将使用端口 80。

4

1 回答 1

0

事实证明,如果你使用git clone http://[IP]:80/project.git它将使用端口 80。我想我正在尝试使用域,所以它没有解析 IP,我认为这是因为端口 80 仅 git:// (9418) 不起作用或 SSH (22) 或 HTTPS (443)。

于 2015-09-04T16:40:03.727 回答