将分支推到远程存储库时遇到的主错误: Git失败,导致致命错误。Git失败了,出现了致命的错误。无法访问'https:/:错误设置证书验证位置: CAfile: C:/Program /Git/mingw64 64/ssl/certs/ca-bundle.crt CApath:没有人未能将分支推到远程存储库。
发布于 2022-10-25 06:35:46
如果将Visual安装(或重新安装)到D:驱动器,则指向证书的指针将发生更改。在这种情况下,重新安装Git桌面不会有帮助。修复:找到旧的gitconfig文件并在适当的编辑器中打开(在管理模式下),并更改路径以指向新安装的位置(或者,在我的例子中,仅是驱动器号)。
C:\Program Files\Git\etc\gitconfig文件看起来应该是这样的:
[diff "astextplain"]
textconv = astextplain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[http]
sslBackend = openssl
sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
[core]
autocrlf = true
fscache = true
symlinks = false
editor = \"C:\\\\Program Files\\\\Microsoft VS Code\\\\bin\\\\code\" --wait
[pull]
rebase = false
[credential]
helper = manager-core
[credential "https://dev.azure.com"]
useHttpPath = true
[init]
defaultBranch = master经过这些修改后,它将如下所示:
[diff "astextplain"]
textconv = astextplain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[http]
sslBackend = openssl
sslCAInfo = D:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
[core]
autocrlf = true
fscache = true
symlinks = false
editor = \"D:\\\\Program Files\\\\Microsoft VS Code\\\\bin\\\\code\" --wait
[pull]
rebase = false
[credential]
helper = manager-core
[credential "https://dev.azure.com"]
useHttpPath = true
[init]
defaultBranch = master很多程序(包括VS)都会在c:驱动器上安装一些东西,如果您遇到了我的情况(C上没有足够的空间:--所以我卸载了所有占用空间的程序并重新安装到D:驱动器上),通常会有某种类型的配置文件指向新的位置,所以最好记住这一点。
发布于 2022-03-26 18:40:35
再次安装git https://git-scm.com/download/win,它将修复此问题。
https://stackoverflow.com/questions/71630829
复制相似问题