解决ssh: connect to host gitlab.com port 22: Connection timed out
来源:互联网 发布:ftp断点下载 java 编辑:程序博客网 时间:2024/05/20 17:38
这是在gitLab下面(github大概需要微调调)
错误如下图:
就是总出现timeout。
好了解决方法如下:
windows 在./ssh文件夹下面,创建文件config,里面写上
##########################################################
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
##########################################################
ssh文件在C:\Users\你的用户\.ssh
最后的文件结构如下:
结束,也可以直接下我的,点击这里下载
最后效果如下:
OK!成功
阅读全文