Git Unknown SSL protocol error in connection to github.com:443

转自:https://www.cnblogs.com/dongguangming/p/13900081.html

现在中美局势动荡不安,老外想搞科技技术*,有时上国外的网站会出现问题,这不就出现了github连接问题(昨天还好好的),现象如下:

Git Unknown SSL protocol error in connection to github.com:443

Git Unknown SSL protocol error in connection to github.com:443

不管通过TortoiseGit图形化工具或是git bash命令行都不行,提示SSL问题。

我就记录下怎么解决的,步骤如下:

1.  打开TortoiseGit自带的PuTTYgen工具,如图

Git Unknown SSL protocol error in connection to github.com:443

2.  打开之后,点击Generate按钮,然后在生成的过程中需要在key框中时刻移动鼠标,目的是生成一些随机数,如图

Git Unknown SSL protocol error in connection to github.com:443

3、准备把生成的公钥添加至GitHub上,如图

 Git Unknown SSL protocol error in connection to github.com:443

 

4、选择Save private key,弹出如下对话框,选择是,如图

 Git Unknown SSL protocol error in connection to github.com:443

 

选择Save private key,弹出如下对话框,选择是,然后选择保存TortoiseGit支持的私钥至路径下C:\Users\dgm\.ssh\private.ppk,如图

Git Unknown SSL protocol error in connection to github.com:443

 然后选择Save public key,保存TortoiseGit支持的公钥至路径C:\Users\dgm\.ssh\authorized_keys(注意无扩展名),如图

Git Unknown SSL protocol error in connection to github.com:443

 

5、运行TortoiseGit软件包中的Pageant程序,如图

Git Unknown SSL protocol error in connection to github.com:443

然后右键选择Windows桌面右下角(通知区域)的图标,出现如下菜单,如图

Git Unknown SSL protocol error in connection to github.com:443

选择Add Key菜单栏,出现Select Private Key File文件选择框,选择之前生成的对应的私钥文件(.ppk)文件,配置完成,如图Git Unknown SSL protocol error in connection to github.com:443

6,、要在Git Bash下使用,需要拥有OpenSSH的私钥,只需要执行转化就可以,点击菜单Conversions->Export OpenSSH Key,如图

Git Unknown SSL protocol error in connection to github.com:443

保存Git Bash支持的私钥至路径C:\Users\dgm\.ssh\id_rsa,如图

Git Unknown SSL protocol error in connection to github.com:443

 

7、在Git Bash中,再次执行github.com上的git pull,拉取成功,如图

Git Unknown SSL protocol error in connection to github.com:443

 8、 也可以通过TortoiseGit图形化界面拉取,

将origin的URL修改为:git@github.com:dongguangming/java.git,

然后设置putty,即为上面步骤中生成的私钥,最后保存,如图

Git Unknown SSL protocol error in connection to github.com:443

紧接着要把TortoiseGit  Network》ssh client 设置为git下面的ssh.exe(不然会报错),如图

Git Unknown SSL protocol error in connection to github.com:443

 

最后TortoiseGit图形化执行拉取pull操作,如图

Git Unknown SSL protocol error in connection to github.com:443

 

 

 

附图:

Git Unknown SSL protocol error in connection to github.com:443

 

 

参考:

  1. How to solve TortoiseGitPlink Fatal Error?  https://*.com/questions/28106717/how-to-solve-tortoisegitplink-fatal-error

     

上一篇:解决git push时出现Failed to connect to github.com port 443: Timed out


下一篇:Failed to connect to github.com port 443: Timed out