赞
踩
$ ssh -T git@github.com
$ ssh -vT git@github.com -p 443
OpenSSH_9.5p1, OpenSSL 3.1.4 24 Oct 2023
debug1: Reading configuration data /c/Users/Administrator/.ssh/config
debug1: /c/Users/Administrator/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [20.205.243.166] port 443.
debug1: connect to address 20.205.243.166 port 443: Connection timed out
ssh: connect to host github.com port 443: Connection timed out
git bash 中vim ~/.ssh/config
修改内容如下:重点第二行:ssh.github.com
Host github.com
HostName ssh.github.com # 这是最重要的部分
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。