ssh: connect to host gitlab.com port 22: Connection timed out
程序员文章站
2024-03-14 09:08:40
...
不知为何 gitlab 经常用着用着就出现以下问题:
解决方法:
在自己的用户目录下找到.ssh/文件夹,在里面创建config文件。
在config文件里面添加以下内容:
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
然后在终端执行以下命令:
ssh -T aaa@qq.com
就可以访问gitlab了。
上一篇: js中的Object.defineProperty方法
下一篇: 传输GZIP格式,解压缩
推荐阅读
-
ssh:connect to host localhost port 22: Connection refuse解决
-
master: ssh: connect to host master port 22: Connection refused
-
ssh: connect to host ip port 22: Network is unreachable
-
ssh: connect to host 10.224.120.107 port 22: No route to host
-
ubuntu: ssh: connect to host ubuntu port 22: No route to host
-
ssh: connect to host github.com port 22: Connection timed out
-
ssh: connect to host gitlab.com port 22: Connection timed out
-
Ubuntu SSH - ssh: connect to host ****** port 22: Connection refused
-
ssh: connect to host github.com port 22: Connection timed out的解决方法
-
Mac中git报错ssh: connect to host github.com port 22: Connection timed out