修改Git安装目录:error setting certificate verify locations: CAfile: F:/Git/mingw64/ssl/certs/ca-bundle.crt

问题

修改了Git所在的安装目录后

  1. 在文件夹鼠标右键点击Git Bash Here 提示找不到应用程序
  2. git push 报错 error setting certificate verify locations: CAfile: F:/Git/mingw64/ssl/certs/ca-bundle.crt

解决

  1. 修改注册表

win + R 输入 cmd 打开
cmd 输入 regedit打开注册表
在这里插入图片描述
注册表依次寻找以下目录
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell
修改其中git_shell和git_shell的目录及其内部command的目录
在这里插入图片描述

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell
修改其中git_shell和git_shell的目录及其内部command的目录
在这里插入图片描述

  1. git bash下重新配置 ca-bundle.crt 目录
$ git config --system http.sslcainfo "F:\baishan2203\Git\mingw64\ssl\certs\ca-bundle.crt"

猜你喜欢

转载自blog.csdn.net/qq_43681073/article/details/124764742