> 技术文档 > 关于git 报错“fatal: unable to access ‘https://gitee.com/.../.git‘: Recv failure Connection was rese的办法_gitee unable to access

关于git 报错“fatal: unable to access ‘https://gitee.com/.../.git‘: Recv failure Connection was rese的办法_gitee unable to access


项目场景:

在本人试过网上各种办法后毫无效果,现找到一种最快捷的办法。


问题原因:

配置冲突或代理错误


解决方案:

手动删除全局配置文件——找到全局配置文件路径:

  • WindowsC:\\Users\\你的用户名\\.gitconfig

  • Mac/Linux~/.gitconfig

直接删除该文件(下次运行 Git 命令时会自动生成新文件)。

影响范围

删除后,以下常用配置会被清除:

  • 用户名和邮箱(user.nameuser.email
  • 代理设置(http.proxyhttps.proxy
  • 默认编辑器(core.editor
  • 换行符规则(core.autocrlf

需在删除后重新配置必要项:

git config --global user.name \"你的名字\"git config --global user.email \"你的邮箱\"

删除后的验证:

git config --global --list# (无输出)