当git地址为https协议时,如果证书不合法,会提示SSL certificate problem: self signed certificate的错误,解决方法有两种:

  • clone时加入取消ssl验证的设置

    1
    git -c http.sslVerify=false clone <repository-name>
  • 全局取消ssl验证的设置

    1
    git config --global http.sslVerify false