首页 > Web开发 > 详细

解决 git 上传: Failed to connect to github.com port 443: Timed out

时间:2021-04-03 20:49:58      阅读:34      评论:0      收藏:0      [点我收藏+]



环境:

windows 10

Git Bash


问题:Failed to connect to github.com port 443: Timed out

 

到这这个问题的原因可能是 ssh的公钥没有配置好;

  • 首先确认一下自己有没有生成公钥,并在github设置; 具体方法见: 使用 SSH 连接到 GitHub
  • 其次确认自己的git 有没有配置好公钥;


具体检查的方法是:

windows上的公钥和密钥是放在了目录:

Step1 找到git的安装目录, 并找到

技术分享图片


在该目录下 找到 .ssh

技术分享图片


修改 ssh_config的配置即可

修改内容如下:

在文件中追加:


  1 
  2 Host github.com
  3 
  4 User git
  5 
  6 Hostname ssh.github.com
  7 
  8 PreferredAuthentications publickey
  9 
 10 IdentityFile ~/.ssh/id_ed25519
 11 
 12 Port 443
其中的 IdentityFile ~/.ssh/id_ed25519 需要换成自己的公钥路径;


做完以上步骤后就可以用git bash更新代码了;
技术分享图片

解决 git 上传: Failed to connect to github.com port 443: Timed out

原文:https://www.cnblogs.com/greentomlee/p/14613993.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!