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

相关推荐
2501_916766545 小时前
【Git学习】Git的tag标签
git·学习
CoderJia程序员甲5 小时前
GitHub 热榜项目 - 日榜(2025-12-11)
git·ai·开源·llm·github
aoxiang_ywj5 小时前
git add 和git commit之后怎么撤销?
git
winner88816 小时前
告别“这个分支是干啥的?”:Git分支层级命名实战
git·git push -u·分支关联·层级分支命名
真上帝的左手6 小时前
3. 代码管理-Git实战
git
lin62534229 小时前
Android仿小米视频播放器的缩放滚轮
android·git·github
互亿无线明明9 小时前
在 Go 项目中集成国际短信能力:从接口调试到生产环境的最佳实践
开发语言·windows·git·后端·golang·pycharm·eclipse
world_in_world9 小时前
git常见场景命令
git
码上成长10 小时前
长耗时接口异步改造总结
前端·git·后端
Elieal10 小时前
Git 面试题全面汇总
git