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

标签 git ubuntu certificate gitlab

如何将自定义证书添加到 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

关于git - 如何将自定义证书添加到 git 客户端? (Ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41698193/

相关文章:

svn - 将本地 Git 存储库与主 Subversion 存储库一起使用

git - 为什么 'git bisect' 分支不知道?

Xcode 复制我的存储库并将其位置重命名为小写

multithreading - 模拟器上的单核多线程

android - 使用自签名证书的 HTTPS 产生握手错误

git - 澄清/清理 GIT 中的行尾问题

python - 如何解决错误: AttributeError: module 'pyglfw' has no attribute 'pyglfwInit'

bash - 在我的 Ubuntu 安装中,VERBOSE 环境变量在哪里以及为什么设置为 "no"?

iphone - 将 Xcode 证书移至 iPhone Dev 的新系统

java - 如何知道哪个 X509 证书签署了另一个证书(Java)