我的 GitLab 服務器有一個自簽名證書。當我克隆一個存盤庫時,我得到
fatal: unable to access 'https://10.10.10.10.10/gitlab-instance-3b9321be/test.git/': Issuer certificate is invalid.
運行此命令后git config --global http.sslVerify false,克隆成功完成。我不想全域忽略證書,所以我洗掉了我的~/.gitconfig檔案并運行了這個命令git config --global --bool --add http.https://10.10.10.10.sslverify false。現在我的./gitconfig樣子是這樣的:
[http "https://10.10.10.10"]
sslverify = false
git clone 失敗并出現原始錯誤。
我在 RHEL 7.8 上運行,我的 git 版本是 1.8.3.1。這應該基于其他答案。我究竟做錯了什么?
uj5u.com熱心網友回復:
這應該基于其他答案。
(是什么讓你相信?這不是真的。它會是真的,除了......)
我在 RHEL 7.8 上運行,我的 git 版本是 1.8.3.1。
來自 Git 1.8.5 發行說明:
* The "http.*" variables can now be specified for individual URLs. For example, [http] sslVerify = true [http "https://weak.example.com/"] sslVerify = false would flip http.sslVerify off only when talking to that specific site.
注意 1.8.5 > 1.8.3.1:你的 Git 版本太舊了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/488193.html
