当前位置:   article > 正文

ssh -T git@github.com Connection timed out 解决方案-自测有效_ssh -t git@报错

ssh -t git@报错

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/184462
推荐阅读
相关标签
  

闽ICP备14008679号