Git 克隆倉庫報unable to get local issuer certificate錯誤解決方法git
By:授客 QQ:1033553122服務器
克隆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 命令影響範圍僅針對當前倉庫,須要在對應倉庫目錄下執行: