克隆gitlab上的仓库,报错,如下
$ git clone https://gitlab.xxx.net/qa/casstestmanage.git
Cloning into 'casstestmanage'...
fatal: unable to access 'https://gitlab.xxx.net/qa/casstestmanage.git/': SSL certificate problem: unable to get local issuer certificate
这是由于当你通过HTTPS访问Git远程仓库的时候,如果服务器上的SSL证书未经过第三方机构认证,git就会报错。因为未知的没有签署过的证书意味着可能存在很大的风险
设置关闭SSL验证
步骤1:
$ env GIT_SSL_NO_VERIFY=true git clone https://gitlab.xxx.net/qa/casstestmanage.git
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 命令影响范围仅针对当前仓库,需要在对应仓库目录下执行:
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有