致命:无法访问“https://github.xxxx”:发送失败:连接已重置

问题描述 投票:0回答:1

我和提出这个问题的人有完全相同的问题:致命:无法访问'https://gitlab.xxxx':发送失败:连接已重置。他们通过禁用防病毒软件使其再次工作。

当我尝试执行

git push -u origin main
git fetch
时,遇到以下错误:

致命:无法访问“https://github.com/...”:发送失败:连接已重置。

我已尝试以下故障排除步骤:

  • 禁用卡巴斯基全方位安全软件中的所有内容(所有“基本威胁防护”、“高级威胁防护”、“安全控制”和“数据保护”)
  • 重置我的网络并尝试了两个不同的网络
  • 关闭 IPv6(也重新启动我的电脑)
  • 重新安装Git
  • 在 GitHub 上创建新存储库
  • 使用 Bitbucket 而不是 GitHub
  • 卸载卡巴斯基 VPN

此外,我依次执行了以下命令:

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 建议不要在答案部分提问。)

windows git github kaspersky
1个回答
0
投票

将 GitHub 身份验证从 HTTPS 更改为 SSH 解决了我的问题。以下是官方说明:https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#switching-remote-urls-from-https-to-ssh

© www.soinside.com 2019 - 2024. All rights reserved.