GitLab错误:连接主机gitlab.com端口22超时

6

我把默认的ssh端口从22改为了2233,但是当我想通过ssh从gitlab上克隆项目时,它无法工作。

ssh: connect to host gitlab.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

修改后:我也将2233更改为22,但它根本没有变化。

1个回答

1

首先,当使用SSH访问gitlab.com时,始终会通过22端口进行访问: gitlab.com不会在任何其他端口上监听SSH连接。

其次,这是一个客户端(您的)问题:端口22可能被阻止(防火墙、公司政策、ISP等)

请至少尝试查看是否可以使用HTTPS克隆。

 git clone https://gitlab.com/<user>/<repo>

关于HTTPS,请检查您是否在代理后面,例如在Windows上 这里


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接