简体   繁体   English

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

[英]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.sslCAInfohttp.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.

相关问题 服务器证书验证失败。 CAfile:/etc/ssl/certs/ca-certificates.crt CRLfile:更改为 https 后无 - server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none after changing to https Git 克隆使用 gitlab 自签名 CA 抛出错误:请求的域名与服务器的证书不匹配 - Git clone use gitlab self-signed CA throws error: requested domain name does not match the server's certificate 由于根证书过期,gitlab-runner 无法克隆 - gitlab-runner cannot clone due to expired root certificate 致命:无法访问“https://xxxx.git/”:服务器证书验证失败。 CAfile:/etc/ssl/certs/ca-certificates.crt CRLfile:无 - fatal: unable to access 'https://xxxx.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none GitHub SSL:无效的CA证书#1 - GitHub SSL: invalid CA certificate #1 使用git commit强制执行经过身份验证的用户名(本例中为Gitlab) - Enforce authenticated usernames with git commits (Gitlab in this case) SSL:已设置CA证书,但已禁用证书验证-Mac OS Sierra - SSL: CA certificate set, but certificate verification is disabled - Mac OS Sierra 更改证书外部CA后,“无法获得本地发行者证书” - “Unable to get local issuer certificate” after changing the certificate External CA git:无法启动GitLab - git: cannot push on GitLab 无法连接到 gitlab - Cannot connect to gitlab
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM