Gitlab:Peer's Certificate issuer is not recognized

随声附和 提交于 2020-12-02 06:53:27

问题


I get this error on a fresh install of gitlab. The message looks like:

fatal: unable to access 'https://gitlab-ci-
token:xxxxxxxxxxxxxxxxxxxx@gitlab.example.com/something.git/': Peer's 
Certificate issuer is not recognized.ERROR: Job 
failed: exit status 1

Any suggestions on how to fix it?


回答1:


Had faced the same problem after enabling verbose mode by following command export GIT_CURL_VERBOSE=1 and found the following issue:

NSS error -8179 (SEC_ERROR_UNKNOWN_ISSUER)

Found this following site helpful,But its good when you have entire control for the proxy server as well to enter the certificates.

http://dropbit.com/?p=168

I instead ran following command to bypass ssl verification by porxy server and it worked

git config --global http.sslVerify "false"



回答2:


You need to configure /etc/gitlab/gitlab.rb. Change this line

nginx['ssl_certificate'] = "/etc/gitlab/<your-local-path>/cert.pem"

to

nginx['ssl_certificate'] = "/etc/gitlab/<your-local-path>/fullchain.pem"

(Assuming, you already have nginx enabled and you have correctly issued certificates, e.g. from LetsEncrypt.)

then restart gitlab and you're done:

$ gitlab-ctl reconfigure

Why - cert.pem does not contain full certificate chain, thus ca chain cannot be verified. Replacing with fullchain.pem solves it.



来源:https://stackoverflow.com/questions/45608595/gitlabpeers-certificate-issuer-is-not-recognized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!