ssh:connect to host github.com port 22: Connection timed out

解决流程

1.将github的端口由22改为443

ssh -T -p 443 git@ssh.github.com

2.接着输入yes进行确认

The authenticity of host '[ssh.github.com]:443 ([192.168.1.100]:443)' can't be established.
TG45532 key fingerprint is SHA256:+dfjeDFlkkfdfkDFKEidkfkDFkkKKdjFESDCFLE.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:1: github.com
Are you sure you want to continue connecting (yes/no/[fingerprint])? 
 

3.在C:\Users\.ssh目录下创建config文件,输入 

Host github.com
  HostName ssh.github.com
  Port 443
 

4.然后进行git push就能推上去,或者使用git pull就能下拉下来。 

相关推荐

  1. 周报 | 24.4.22-24.4.28文章汇总

    2024-01-17 12:04:01       14 阅读
  2. ubuntu22 安装docker26

    2024-01-17 12:04:01       19 阅读
  3. Day22

    2024-01-17 12:04:01       35 阅读
  4. test22

    2024-01-17 12:04:01       13 阅读
  5. Python作业答疑_6.22~6.25

    2024-01-17 12:04:01       31 阅读
  6. ubuntu 18/20/22 安装 mysql 数据库

    2024-01-17 12:04:01       43 阅读
  7. Ubuntu 22.04 安装cmake3.28

    2024-01-17 12:04:01       46 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-17 12:04:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-17 12:04:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-17 12:04:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-17 12:04:01       20 阅读

热门阅读

  1. 126. Word Ladder II

    2024-01-17 12:04:01       37 阅读
  2. 【Leetcode】2719. 统计整数数目

    2024-01-17 12:04:01       31 阅读
  3. C++客户端服务器TCP创建

    2024-01-17 12:04:01       30 阅读
  4. 机器学习之泊松分布及均匀分布

    2024-01-17 12:04:01       29 阅读
  5. 1.3 面试经典150题 - 删除有序数组中的重复项

    2024-01-17 12:04:01       34 阅读
  6. 医院体检中心客户满意度抽样方法

    2024-01-17 12:04:01       36 阅读
  7. Linux 压缩解压

    2024-01-17 12:04:01       30 阅读
  8. C++中的指针、引用和数组

    2024-01-17 12:04:01       29 阅读