Gitlab git clone 使用 HTTPS-无法获取本地颁发者证书

Gitlab git clone 使用 HTTPS-无法获取本地颁发者证书

当我使用时git clone https://my.example.com/gitlab/java/repository.git,我得到

克隆到‘存储库’...
致命:无法访问'https://my.example.com/gitlab/java/repository.git':
SSL 证书问题:无法获取本地颁发者证书

如果我设置它就可以正常工作git config --global http.sslVerify false

Gitlab 与 Apache2 和 SSL 一起使用,转发到 gitlab-workhorse。有关配置的更多详细信息:用于存储库克隆的 Gitlab HTTPS URI 不起作用-无法验证 SSL 主机-致命:无法访问

我尝试添加 SSL 证书,因为它们与 Apache 配置中的相同,但没有帮助:

nginx['ssl_certificate'] = “/etc/gitlab/ssl/my.example.com.crt”
nginx['ssl_certificate_key'] = “/etc/gitlab/ssl/my.example.com.key”

如何配置它以通过 HTTPS 执行 git 操作而不禁用验证?

答案1

使用以下方式检查 SSLhttps://www.sslshopper.com/ssl-checker.html并且它显示了一些警告,而浏览器并没有抱怨 URL。它缺失SSLCertificateChainFile /etc/apache2/ssl/1_root_bundle.crt/etc/apache2/sites-available/default-ssl.conf

相关内容