Gitlab:Peer's Certificate issuer is not recognized

Viewed 32735

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?

2 Answers

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.

Related