如何将自定义证书添加到 git 客户端? (Ubuntu)

How to add custom certificate to git client? (Ubuntu)

如何将自定义证书添加到 git 客户端?

我有证书,我想从 gitlub.

克隆一些项目

但是我有一个错误:

fatal: unable to access 'https://some.gitlub.url': Problem with the SSL CA cert (path? access rights?)

Windows模拟:git config --global http."https://some.gitlub.url".sslCAInfo "work/gitlab.cer

您需要配置 GIT 以信任您的证书

$> git config --global http."https://some.gitlub.url".sslCAInfo ~/git-certs/cert.pem

建议也这样做:

$> git config --global --unset http.sslVerify
$> git config --global --list