Git SSL certificate problem: unable to get local issuer certificate
Posted Xavier Jiezou
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git SSL certificate problem: unable to get local issuer certificate相关的知识,希望对你有一定的参考价值。
项目场景
使用 git clone
命令从 GitHub 克隆一个仓库到本地:
git clone https://github.com/XavierJiezou/ys-dl.git
问题描述
$ git clone https://github.com/XavierJiezou/ys-dl.git
Cloning into 'ys-dl'...
fatal: unable to access 'https://github.com/XavierJiezou/ys-dl.git/': SSL certificate problem: unable to get local issuer certificate
报错信息翻译:SSL证书问题:无法获取本地颁发者证书。
解决方案
git config --global http.sslverify false
打开终端,执行上述命令后成功解决问题:
$ git config --global http.sslverify false
$ git clone https://github.com/XavierJiezou/ys-dl.git
Cloning into 'ys-dl'...
remote: Enumerating objects: 146, done.
remote: Counting objects: 100% (146/146), done.
remote: Compressing objects: 100% (108/108), done.
Receiving objects: 82% (120/146)
Receiving objects: 100% (146/146), 822.00 KiB | 2.00 MiB/s, done.
Resolving deltas: 100% (71/71), done.
原因分析
既然报错说是 SSL 证书有问题,那我们跳过证书验证就行了。
引用参考
以上是关于Git SSL certificate problem: unable to get local issuer certificate的主要内容,如果未能解决你的问题,请参考以下文章
Git SSL certificate problem: unable to get local issuer certificate
解决:git SSL certificate problem: unable to get local issuer certificate
GIT PUSH SSL certificate problem
解决git clone报错SSL certificate problem
git SSL certificate problem: unable to get local issuer certificate-解决问题
git SSL certificate problem: unable to get local issuer certificate-解决问题