1.在连接github的时候,遇到了一个特别难解决的问题:ssh: connect to host github.com port 22: Connection timed out,网上看了好多,但是依旧没有解决。下面来试一下我这种方式
2.连接超时,首先找到git的安装目录,找到/etc/ssh/ssh_config文件
3.用notepad++打开这个文件,如下图:
4.把如下内容复制到ssh_config文件的末尾处:并记得保存
1)Host github.com
User git //写上自己的登录名或者邮箱
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
如图: