error setting certificate verify locations: CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none

这个问题是因为git配置里crt证书的路径不正确导致的。

  • 这个路径配置是在C:\Program Files\Git\etc\gitconfig中,应该所有人的配置都在这里
[diff "astextplain"]
	textconv = astextplain
[http]
	sslBackend = openssl
	sslCAInfo = D:/Git/mingw64/ssl/certs/ca-bundle.crt # 原来默认写的就是 C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
[core]
	autocrlf = true
	fscache = true
	symlinks = false
[pull]
	rebase = false
[credential]
	helper = manager-core
[credential "https://dev.azure.com"]
	useHttpPath = true
[init]
	defaultBranch = master
  • ca-bundle.crt 而该文件是在git的安装目录下的,比如我的git安装路径是在D:\Git\,所以我本机的crt文件就在D:/Git/mingw64/ssl/certs/ca-bundle.crt
  • 改之,即可。
posted @ 2022-05-23 10:38  echo_lovely  阅读(1874)  评论(0编辑  收藏  举报