[英]gitlab Peer certificate cannot be authenticated with known CA certificates
When I setting up gitlab on centos 6 under the real ip, I meet this error finnally. 当我在真正的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
How can I solve this? 我怎么解决这个问题?
You have number of options: 您有多种选择:
On an off chance that SSL verification fails due to out-of-date or absent CA certificates. 由于过期或缺少CA证书而导致SSL验证失败的可能性很小。
sudo yum reinstall ca-certificates
might help. sudo yum reinstall ca-certificates
可能有所帮助。 Make sure you have them and, possibly, point git to the right path with git config http.sslCAInfo
or http.sslCAPath
. 确保你拥有它们,并且可能使用
git config http.sslCAInfo
或http.sslCAPath
git config http.sslCAInfo
指向正确的路径。
Install properly signed ceritificate on gitlab site, so your git-over-HTTPS does not complain when it sees self-signed certificate which would be fairly typical in simple setups. 在gitlab网站上安装正确签名的证书,这样当你看到自签名证书时,你的git-over-HTTPS就不会抱怨,这在简单的设置中是相当典型的。
Disable SSL certificate verification with git config http.sslVerify false
or set GIT_SSL_NO_VERIFY
in the environment. 使用
git config http.sslVerify false
禁用SSL证书验证或在环境中设置GIT_SSL_NO_VERIFY
。
use git clone git://...
to clone your repo. 使用
git clone git://...
来克隆你的repo。
I use a selfsigned cert for offering git via https. 我使用自签名证书通过https提供git。
On Fedora clients the following can be used so the client trusts the https certificate. 在Fedora客户端上,可以使用以下内容,以便客户端信任https证书。 "fluxcoil.net_201404.cert" is the PEM file containing the https certtificate, or an own CA which has signed the https cert:
“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.