我和提出这个问题的人有完全相同的问题:致命:无法访问'https://gitlab.xxxx':发送失败:连接已重置。他们通过禁用防病毒软件使其再次工作。
当我尝试执行
git push -u origin main
或git fetch
时,遇到以下错误:
致命:无法访问“https://github.com/...”:发送失败:连接已重置。
我已尝试以下故障排除步骤:
此外,我依次执行了以下命令:
git config --global http.sslVerify false
git config --global --unset http.proxy
git config --global --unset https.proxy
git config http.postBuffer 524288000
但是,这些解决方案都不适合我。如果有任何进一步的建议,我将不胜感激。
(注:由于我的声誉不足,我没有对原始问题发表评论或提供答案,因为 Stack Overflow 建议不要在答案部分提问。)
将 GitHub 身份验证从 HTTPS 更改为 SSH 解决了我的问题。以下是官方说明:https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#switching-remote-urls-from-https-to-ssh