您当前的位置: 首页 >  git

Xavier Jiezou

暂无认证

  • 2浏览

    0关注

    394博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

【Git】 SSL certificate problem: unable to get local issuer certificate

Xavier Jiezou 发布时间:2022-05-16 14:32:49 ,浏览量:2

项目场景

使用 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 - git-config Documentation

关注
打赏
1661408149
查看更多评论
立即登录/注册

微信扫码登录

2.1313s