GIT clone报错: SSL certificate problem: unable to get local issuer certificate

刺骨的言语ヽ痛彻心扉 2023-08-17 16:38 284阅读 0赞
  1. 今天尝试下载公司代码库中代码,熟悉一下公司的开发架构,使用git clone拉代码时出错,查找了一些资料原来是SSL
  2. 报错:
  3. $ git clone https://github.XXX.git
  4. Cloning into 'XXX'...
  5. fatal: unable to access 'https://github.XXX.git/': SSL certificate problem: unable to get local issuer certificate
  6. 原因分析:这里其实是电脑没有安装对应的ca证书,所以无法通过https连接到git服务器。
  7. 查看gitssl验证是否开启
  8. git config --get http.sslVerify
  9. 从查询结果来看git默认是开启ssl验证,但是电脑没有安装对应的ca证书,所以无法通过https连接到git服务器。

20190929093303333.png

解决办法:

  1. 这里通过设置gitssl验证跳过了这个错误(win下):
  2. git config --global http.sslVerify false

发表评论

表情:
评论列表 (有 0 条评论,284人围观)

还没有评论,来说两句吧...

相关阅读