2

今天我的 Visual Studio 2019 团队资源管理器 github 推送出现以下错误。
我不知道如何解决这个错误。

错误信息 :

Pushing master
Error encountered while pushing to the remote repository: Git failed with a fatal error.
unable to access 'https://github.com/xxxxxxx.git': error setting certificate verify locations:
  CAfile: c:/program files (x86)/microsoft visual studio/2019/community/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin/curl-ca-bundle.crt
  CApath: none
Pushing to https://github.com/xxxxxxx.git

image-20200820161839927

image-20200820161904353

我的 git 版本:

$ git --version
git version 2.17.1.windows.2

我的C:\ProgramData\Git\config

[core]
    symlinks = false
    autocrlf = true
    fscache = true
[color]
    diff = auto
    status = auto
    branch = auto
    interactive = true
[help]
    format = html
[rebase]
    autosquash = true

更新 :

我没有检查文件C:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\teamfoundation\team explorer\Git\mingw32\bin\curl-ca-bundle.crt

4

2 回答 2

7

如果您在卸载“Git for Windows”后遇到此错误,请确保手动删除文件夹“C:\Program Files\Git”。卸载过程会在“C:\Program Files\Git\etc”中留下一个“gitconfig”文件,该文件由 Visual Studio 拾取,并与“加密网络提供商”设置中的“OpenSSL”值一起导致问题。作为一种解决方法,也可以将值更改为“安全通道”。

Visual Studio Git 全局设置

于 2020-12-10T09:38:49.087 回答
1

关注此页面致命:无法访问 curl-ca-bundle.crt · 问题 #4836 · 桌面/桌面

  1. 我发现curl-ca-bundle.crtC:\Program Files (x86)\Git\bin\curl-ca-bundle.crt
  2. 将其复制到C:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\teamfoundation\team explorer\Git\mingw32\bin\curl-ca-bundle.crt
  3. 尝试推入vs2019,它的工作。

image-20200820163528852

image-20200820163726502

于 2020-08-20T08:38:10.650 回答