[GIT] GIT推送/拉取远程代码时报:unable to access 'https://github.com/xxxx/yyyy.git/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

1 问题描述

$ git push
fatal: unable to access 'https://github.com/xxxx/yyyy-parent.git/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

2 问题分析 + 解决方法

  • 原因1:VPN代理导致本地网络异常 【博主采用此法解决】

如果你开启了VPN,很可能是因为代理的问题,这时候设置一下http.proxy就可以了
一定要查看自己的VPN端口号,假如你的端口号是7890,在git bash命令行中输入以下命令即可:

git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890

如果你之前git中已经设置过上述配置,则使用如下命令取消再进行配置即可:

git config --global --unset http.proxy
git config --global --unset https.proxy
  • 原因2:VPN代理服务器节点自身故障

即 :是你的VNP代理服务器节点有问题,有时候更换一个结点就好了。当然,也可以使用自己搭建的代理服务器。

  • 原因2:ssl组件问题
git config --global http.sslBackend "openssl"
git config --global http.sslCAInfo "C:\Program Files\Git\mingw64\ssl\cert.pem"

或 可能是这样:
git config --global http.sslBackend "openssl"
git config --global http.sslCAInfo "http.sslcainfo=D:/Program Files(x86)/Git/Git/mingw64/ssl/certs/ca-bundle.crt"

注意:路径要换成git安装的路径

X 参考文献

基于此思路,得以解决

posted @ 2024-02-21 23:13  千千寰宇  阅读(1138)  评论(0编辑  收藏  举报