背景

        git push向服务器时报错“fatal: unable to access 'https://gitee.com/***.git/': SSL certificate problem: self signed certificate in certificate chain”,最近一次push是在前一天,当时使用的网络环境是家里的正常网络,出现这个问题时使用的网络为公司的网络。

问题

        git push代码时报错“fatal: unable to access 'https://gitee.com/on_jiyuan/tsjt.git/': SSL certificate problem: self signed certificate in certificate chain”如何解决?

说明

        出现这个问题的原因大致是因为当前的网络服务器的SSL证书没有在你要交互的服务器上关联,所以在你交互的时候会提示你证书异常。

解决办法

命令如下:

        # 关闭git证书校验
        git config --global http.sslVerify "false"

        # 开启git证书校验
        git config --global http.sslVerify "true"

效果图

关闭证书验证后push时会有警示信息,但是不妨碍正常的数据提交。如下图:

 关闭前的错误提示。如下图:

Logo

鸿蒙生态一站式服务平台。

更多推荐