1. 问题形容

第一次尝试推送IDEA我的项目到远端GitHub仓库。实现最初一步push过程中呈现点问题。

报错图:

残缺报错信息:

    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-upstreamfatal: 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文件门路。

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"

相干文章:

  • git提醒error setting certificate verify locations解决办法