想让“git clone”在严格的防火墙后面工作吗?帮我向网络管理员询问我需要什么

想让“git clone”在严格的防火墙后面工作吗?帮我向网络管理员询问我需要什么

最终目标是使此命令起作用:

git clone https://github.com/ablab/quast.git

网络管理员说这些是开放的:

请注意目标 IP 为:

host1.github.com  192.30.253.112
host2.github.com  192.30.253.113
security1.ubuntu.com  91.189.91.26
security2.ubuntu.com  91.189.91.23
security3.ubuntu.com  91.189.88.149
security4.ubuntu.com  91.189.88.152
security5.ubuntu.com  91.189.88.162
security6.ubuntu.com  91.189.88.161

另请注意,允许的服务包括:

NAME      PORT
--------------    ---------
l_tcp_9418    9418
service-http  80
ssh           22

我已经完成了故障排除。Ping 工作正常,wget google.com 不起作用,因为我没有明确打开它。我尝试打开与 github 的连接,但显然我遗漏了一些东西,否则“git clone”就可以正常工作。有什么帮助吗?

=======================================
TESTING ping google.com
=======================================
PING google.com (172.217.6.110) 56(84) bytes of data.
64 bytes from ord37s03-in-f14.1e100.net (172.217.6.110): icmp_seq=1 ttl=53 time=8.05 ms
64 bytes from ord37s03-in-f14.1e100.net (172.217.6.110): icmp_seq=2 ttl=53 time=8.00 ms
64 bytes from ord37s03-in-f14.1e100.net (172.217.6.110): icmp_seq=3 ttl=53 time=8.02 ms



#=======================================
# TESTING ping github.com
#=======================================
PING github.com (192.30.253.113) 56(84) bytes of data.
64 bytes from 192.30.253.113: icmp_seq=1 ttl=48 time=29.9 ms
64 bytes from 192.30.253.113: icmp_seq=2 ttl=48 time=30.0 ms
64 bytes from 192.30.253.113: icmp_seq=3 ttl=48 time=30.0 ms



#=======================================
# TESTING wget google.com
#=======================================
--2017-07-11 07:13:14--  http://google.com/
Resolving google.com (google.com)... 172.217.6.110, 2607:f8b0:4009:812::200e
Connecting to google.com (google.com)|172.217.6.110|:80...


#=======================================
# TESTING wget https://github.com/ablab/quast/archive/master.zip
#=======================================
--2017-07-11 07:13:24--  https://github.com/ablab/quast/archive/master.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443...


#=======================================
# TESTING wget --verbose https://github.com/ablab/quast/archive/master.zip
#=======================================
--2017-07-11 07:13:34--  https://github.com/ablab/quast/archive/master.zip
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443...


#=======================================
# TESTING git clone https://github.com/ablab/quast.git
#=======================================
Cloning into 'quast'...



#=======================================
# TESTING git clone -v https://github.com/ablab/quast.git
#=======================================
Cloning into 'quast'...

答案1

如果您想通过 HTTPS 使用 git 进行克隆,则需要打开 HTTPS 端口,即 443。但是,由于您允许使用 SSH,因此您可以通过 SSH 使用 git:

git clone [email protected]:ablab/quast.git

为此,你需要创建一个 Github 帐户并添加 SSH 私钥

您还可以使用普通的 git 协议(默认使用端口 9418):

git clone git://github.com/ablab/quast.git

相关内容