VS2019:推送到远程存储库时遇到错误:Git失败并出现致命错误。无法访问

时间:2020-08-20 08:21:55

标签: git visual-studio-2019

今天我的Visual Studio 2019团队资源管理器github push遇到以下错误。
我不知道如何解决此错误。

错误消息:

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上没有检查文件

2 个答案:

答案 0 :(得分:0)

关注此页面fatal: unable to access curl-ca-bundle.crt · Issue #4836 · desktop/desktop

  1. 我在curl-ca-bundle.crt找到了C:\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

答案 1 :(得分:0)

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

Visual Studio Git Global Settings