Git使用无法拉取

错误提示:

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

相关推荐
CoderJia程序员甲11 小时前
GitHub 热榜项目 - 日榜(2025-12-30)
git·ai·开源·llm·github
夜流冰13 小时前
Git - github-git-cheat-sheet
git·github
AD钙奶-lalala14 小时前
本地新建分支并推到远程Git实现
git
Yulki21 小时前
【经验分享】Git如何连接Github私有仓库
经验分享·git·github
弘毅 失败的 mian21 小时前
Git 多人协作
经验分享·笔记·git
猫腻余腥1 天前
Git 命令使用教程
git
lanhuazui101 天前
git常见操作
git
未名编程1 天前
本地项目上传 GitHub 私有库:GitHub CLI 与 Git 原生双方案详解
git·github
我是一只代码狗1 天前
git和master分支进行对比差异
git
弘毅 失败的 mian1 天前
Git 标签管理
经验分享·笔记·git