错误描述

OpenSSL SSL_connect: Connection was reset in connection to github.com:443
看错误描述就标识ssl连接不到443端口。
本机已经挂了Clash,说明是代理出了问题,所以先检查git的全局配置。

查看全局配置

git config --global -l

检查是否有https.proxy及http.proxy项

设置全局代理设置

示例7890端口是代理软件端口,按个人情况修改。

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

已有设置情况修改代理项

git config --global --unset http.proxy
git config --global --unset https.proxy

原文: