今天下载OneOfEleven的K5固件代码,按照自己的要求编译一下功能,使用git clone拉代码时出错,查找了一些资料原来是SSL。
报错:
$ git clone https://github.com/OneOfEleven/uv-k5-firmware-custom.git
Cloning into 'uv-k5-firmware-custom'...
fatal: unable to access 'https://github.com/OneOfEleven/uv-k5-firmware-custom.git/': SSL certificate problem: unable to get local issuer certificate
原因分析:这里其实是电脑没有安装对应的ca证书,所以无法通过https连接到git服务器。
查看git的ssl验证是否开启
git config --get http.sslVerify
从查询结果来看git默认是开启ssl验证,但是电脑没有安装对应的ca证书,所以无法通过https连接到git服务器。
解决办法:
这里通过设置git的ssl验证跳过了这个错误(win下):
git config --global http.sslVerify false