ssh: connect to host github.com port 22: Connection timed out fatal: xxx问题解决

avatar 2024年01月25日18:34:47 0 639 views
博主分享免费Java教学视频,B站账号:Java刘哥 ,长期提供技术问题解决、项目定制:本站商品点此

在执行 git pull 时,报错:ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository.

解决办法:

在 C:\Users\liuyanzhao\.ssh 下新建 config 文件

文件内容:

Host github.com
User 847064370@qq.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

然后重新执行 git pull ,解决

  • 微信
  • 交流学习,服务定制
  • weinxin
  • 个人淘宝
  • 店铺名:言曌博客咨询部

  • (部分商品未及时上架淘宝)
avatar

发表评论

avatar 登录者:匿名
匿名评论,评论回复后会有邮件通知

  

已通过评论:0   待审核评论数:0