繁体   English   中英

gitlab对等证书无法使用已知的CA证书进行身份验证

[英]gitlab Peer certificate cannot be authenticated with known CA certificates

当我在真正的ip下在centos 6上设置gitlab时,我终于遇到了这个错误。

[qzi@host test]$ git push -u origin master
fatal: unable to access 'http://10.41.37.180/git/test.git/': Peer certificate cannot be     authenticated with known CA certificates

我怎么解决这个问题?

您有多种选择:

  • 由于过期或缺少CA证书而导致SSL验证失败的可能性很小。 sudo yum reinstall ca-certificates可能有所帮助。 确保你拥有它们,并且可能使用git config http.sslCAInfohttp.sslCAPath git config http.sslCAInfo指向正确的路径。

  • 在gitlab网站上安装正确签名的证书,这样当你看到自签名证书时,你的git-over-HTTPS就不会抱怨,这在简单的设置中是相当典型的。

  • 使用git config http.sslVerify false禁用SSL证书验证或在环境中设置GIT_SSL_NO_VERIFY

  • 使用git clone git://...来克隆你的repo。

我使用自签名证书通过https提供git。

在Fedora客户端上,可以使用以下内容,以便客户端信任https证书。 “fluxcoil.net_201404.cert”是包含https certtificate的PEM文件,或者是已签署https证书的自己的CA:

certutil -d sql:/home/chris/.pki/nssdb -A -t "P,," \
    -n "fluxcoil.net" -i /home/chris/fluxcoil.net_201404.cert

设置http."https://10.41.37.180/".sslCAInfo git config属性:

$ git config http." https://10.41.37.180/ ".sslCAInfo /path/to/certificate.pem

暂无
暂无

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

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