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

相关推荐
GISer_Jing2 小时前
Git协作开发:feature分支、拉取最新并合并
大数据·git·elasticsearch
高山莫衣8 小时前
git rebase多次触发冲突
大数据·git·elasticsearch
码农藏经阁8 小时前
工作中常用的Git操作命令(一)
git
kobe_OKOK_8 小时前
【团队开发】git 操作流程
git·elasticsearch·团队开发
码农垦荒笔记8 小时前
Git 安装闭坑指南(仅 Windows 环境)
windows·git
CC码码18 小时前
管理你的多个 Git 密钥(多平台多账号)
git·gitlab·github
CC码码18 小时前
管理你的多个 Git 密钥(单平台多账号)
git·gitlab·github
大卫小东(Sheldon)18 小时前
GIM 1.5发布了! 支持Windows系统了
git·ai·rust
flying jiang18 小时前
将大仓库拆分为多个小仓库
git
李boyang10 天前
Git(四):远程操作
git