ssh: connect to host bitbucket.org 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.
我的防火墙被禁用,我仍然连接超时。我应该怎么办?
最佳答案
看起来您对默认 SSH 端口有问题,可以通过使用其他端口来避免这些问题。这是一个常见的问题。
基本上,您可以使用端口 443 而不是 22。
To set this in your ssh config, edit the file at ~/.ssh/config, and add this section:
Host github.com Hostname ssh.github.com Port 443
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitlab
资料来源:
关于git - 如何解决端口 22 连接超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52057705/