这个错误是由于git无法找到正确的证书位置导致的。解决方法如下:

  1. 检查git配置:运行以下命令检查git的证书配置是否正确:

    git config --global http.sslCAinfo
    

    如果返回/etc/ssl/certs/ca-certificates.crt,则可以跳过下一步。

  2. 设置证书位置:运行以下命令设置正确的证书位置:

    git config --global http.sslCAinfo %(prefix)//etc/ssl/certs/ca-certificates.crt
    

    确保将%(prefix)替换为你的git安装目录,例如E:/git/Git/mingw64

  3. 重试操作:重启git并尝试再次执行你的操作,看看是否仍然报错。

如果问题仍然存在,可能是因为你的证书文件损坏或缺失。你可以尝试重新安装git或手动下载并安装最新的证书文件。

我使用git报错这是为什么啊encountered old-style etcsslcertsca-certificatescrt that should be prefixetcsslcertsca-certificatescrtfatal unable to access httpsgithubcomcrtdyaxuyaogit error setting certificate verify

原文地址: https://www.cveoy.top/t/topic/hHr8 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录