Gitlab:Peer's Certificate issuer is not recognized

前端 未结 2 1250
眼角桃花
眼角桃花 2021-02-20 07:59

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.co         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-02-20 08:12

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

    nginx['ssl_certificate'] = "/etc/gitlab//cert.pem"
    

    to

    nginx['ssl_certificate'] = "/etc/gitlab//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.

提交回复
热议问题