git 有或没有 ssl 证书
git with or without ssl certificates
我在具有自签名证书的服务器上有 gitlab 运行,并且我已配置 git 使用证书
git config --global http.sslCAInfo path/to/cert.pem
这很好用。但是,我的许多项目都使用 Bower,当我使用 bower install
时,Bower 引发连接到 github 的 SSL 错误。如果我从配置中清除证书,Bower 就会工作。
如何告诉 git 仅对我的 gitlab 域使用自签名证书,而对其他所有内容使用默认证书?
If I clear the certificate fform the config, bower works.
如果清除它,Git 将在 <git>/bin/curl-ca-bundle.crt
中查找 CA(其中还包含 PEM 格式的 CA、Base64 编码的 ASCII 文件并包含“-----BEGIN CERTIFICATE-----
”和“-----END CERTIFICATE-----
”语句)。
您可以简单地将您的证书附加到该文件,这适用于所有 遥控器。
OP aquavitae adds :
Not quite what I need because I'm on arch linux, but it pointed me in the right direction.
I needed to:
- add my certificate to
/etc/ca-certificates/trust-source/anchors
and
- run
trust extract-compat
我在具有自签名证书的服务器上有 gitlab 运行,并且我已配置 git 使用证书
git config --global http.sslCAInfo path/to/cert.pem
这很好用。但是,我的许多项目都使用 Bower,当我使用 bower install
时,Bower 引发连接到 github 的 SSL 错误。如果我从配置中清除证书,Bower 就会工作。
如何告诉 git 仅对我的 gitlab 域使用自签名证书,而对其他所有内容使用默认证书?
If I clear the certificate fform the config, bower works.
如果清除它,Git 将在 <git>/bin/curl-ca-bundle.crt
中查找 CA(其中还包含 PEM 格式的 CA、Base64 编码的 ASCII 文件并包含“-----BEGIN CERTIFICATE-----
”和“-----END CERTIFICATE-----
”语句)。
您可以简单地将您的证书附加到该文件,这适用于所有 遥控器。
OP aquavitae adds
Not quite what I need because I'm on arch linux, but it pointed me in the right direction.
I needed to:
- add my certificate to
/etc/ca-certificates/trust-source/anchors
and- run
trust extract-compat