本文主要是介绍ssh -T git@github.com Connection timed out 解决方案-自测有效,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ssh -T git@github.com Connection timed out 解决方案-自测有效
$ 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
这篇关于ssh -T git@github.com Connection timed out 解决方案-自测有效的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!