Git | CAfile: ca-bundle.crt CApath: none

nathan_lzy

1. 问题描述

第一次尝试推送IDEA项目到远端GitHub仓库。完成最后一步push过程中出现点问题。

报错图:

image.png

完整报错信息:

    19:26:29.537: [JavaProjects] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin master --set-upstream
    fatal: unable to access 'https://github.com/xxxxx/JavaSE_learning.git/': error setting certificate verify locations:  CAfile: D:/main/program/dev/Git/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none
    19:29:16.879: [JavaProjects] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/master:master --set-upstream
fatal: unable to access 'https://github.com/xxxxx/JavaSE_learning.git/': error setting certificate verify locations:  CAfile: D:/main/program/dev/Git/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none

分析: 具体就是xxx/certs/ca-bundle.crt文件路径没有。

2. 问题分析

遇到这个报错才意识到,之前重新卸载安装了git,注册表信息没有修改,导致之前的配置信息(路径)还保留着。

3. 问题解决

S1: 根据报错信息,找到正确路径下的ca-bundle.crt文件路径。

image.png

S2: 打开git-bash,执行如下命令。

格式:

$ git config --system http.sslcainfo "<正确路径>\certs\ca-bundle.crt"

实例:

$ git config --system http.sslcainfo "D:\main\program\dev\Git\mingw64\ssl\certs\ca-bundle.crt"

相关文章:

阅读 395

catchFault
The purpose of this column is to record the problems encountered in programming and give solution...

better and better, day by day.

4 声望
0 粉丝
0 条评论

better and better, day by day.

4 声望
0 粉丝
文章目录
宣传栏