![](/img/trans.png)
[英]GITLAB SSL certificate problem: unable to get local issuer certificate
[英]Git: SSL certificate problem: unable to get local issuer certificate
我用的是git,用的是GitLab,一切正常,直到前幾天開始出現SSL證書問題錯誤:
PS C:\proj> git clone https://git.company.com/dev/myproject.git
Cloning into 'myproject'...
fatal: unable to access 'https://git.company.com/dev/myproject.git/':
SSL certificate problem: unable to get local issuer certificate
據我了解,停用 SSL 驗證是一個安全問題,因此我不喜歡設置http.sslverify false
的解決方案。
問題類似於這個。 找到的解決方案是將http.sslCAInfo
設置為C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
",該解決方案對我不起作用。
有人可以用簡單的話解釋一下:
附言。 按照 VonC 的回答,我得到了建議的版本 output
您需要為您的公司站點獲取證書鏈(中間和根 CA)。
在 git bash session 中,如下所示:
echo | openssl s_client -connect git.company.com:443 -servername git.company.com -showcerts | openssl crl2pkcs7 -nocrl | openssl pkcs7 -noout -print_certs
從那里,你需要
file.crt
中那是:
git config --global http."https://*.comany.com/".sslcainfo "C:\path\to\file.crt"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.