zoukankan      html  css  js  c++  java
  • Git 克隆仓库报unable to get local issuer certificate错误解决方法

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

    By:授客 QQ1033553122

     

    问题描述

    克隆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 命令影响范围仅针对当前仓库,需要在对应仓库目录下执行:

     

     

  • 相关阅读:
    【题解】P2262 [HNOI2004]FTP服务器
    关于大模拟
    CodeForces 666E Forensic Examination
    Bzoj3233 [Ahoi2013]找硬币
    Bzoj4350 括号序列再战猪猪侠
    UOJ#31 【UR #2】猪猪侠再战括号序列
    UOJ#21 【UR #1】缩进优化
    51nod1667 概率好题
    [CodeChef
    51nod1245 Binomial Coefficients Revenge
  • 原文地址:https://www.cnblogs.com/shouke/p/12868316.html
Copyright © 2011-2022 走看看