Git 克隆仓库报unable to get local issuer certificate错误解决方法

 Git 克隆仓库报unable to get local issuer certificate错误解决方法git

By:授客 QQ1033553122服务器

 

问题描述

克隆gitlab上的仓库,报错,以下app

 

$ git clone https://gitlab.xxx.net/qa/casstestmanage.gitgitlab

Cloning into 'casstestmanage'...spa

fatal: unable to access 'https://gitlab.xxx.net/qa/casstestmanage.git/': SSL certificate problem: unable to get local issuer certificate.net

 

 

缘由分析

这是因为当你经过HTTPS访问Git远程仓库的时候,若是服务器上的SSL证书未通过第三方机构认证,git就会报错。由于未知的没有签署过的证书意味着可能存在很大的风险blog

解决办法

设置关闭SSL验证ssl

步骤1:get

$ env GIT_SSL_NO_VERIFY=true git clone https://gitlab.xxx.net/qa/casstestmanage.gitit

Cloning into 'casstestmanage'...

warning: You appear to have cloned an empty repository.

 

 

步骤2:

进入到上述仓库目录下执行 git config http.sslVerify false命令,以便执行其它命令时不报上述错误

$ cd casstestmanage

$ git config http.sslVerify false

 

命令相关说明:

git config --global http.sslverify false 命令的影响范围是系统当前用户

 

 

git config --system http.sslverify false,命令的影响范围是全局全部用户

 

git config http.sslverify false 命令影响范围仅针对当前仓库,须要在对应仓库目录下执行:

 

相关文章
相关标签/搜索