简体   繁体   English

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

[英]How to add custom certificate to git client? (Ubuntu)

How to add custom certificate to git client? 如何将自定义证书添加到git客户端?

I have certificate and i want to clone some project from gitlub. 我有证书,我想从gitlub克隆一些项目。

But I has an error: 但是我有一个错误:

fatal: unable to access ' https://some.gitlub.url ': Problem with the SSL CA cert (path? access rights?) 致命:无法访问“ https://some.gitlub.url ”:SSL CA证书有问题(路径?访问权限?)

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

You need to configure GIT to trust your certificate 您需要配置GIT以信任您的证书

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

It's recommended also to do: 建议也这样做:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM