How do I use let’s encrypt with gitlab?

前端 未结 6 2025
南旧
南旧 2021-01-29 23:02

I started to look in to ssl certificates when I stumbled upon let\'s encrypt, and I wanted to use it with gitlab, however being that it is running on a raspberry pi 2 and its ru

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-29 23:32

    I have no idea if the installation differs on a Raspberry Pi. Let's Encrypt installation process does some magic I don't know anything about.

    Prepare Gitlab

    Type grep 'external_url' /etc/gitlab/gitlab.rb to check the website name. As an example https://gitlab.example.com:50000

    If your external URL does not start with https, change it to begin with https

    The part in bold will be your

    Generate the certificates

    Follow the Let's Encrypt install instructions on this link: https://letsencrypt.org/howitworks/

    I'm not copying the instructions since they may change (as the program is in open beta right now). What you have to run depends on whether you also have websites running on Apache you want to generate Let's Encrypt certs for.

    Once you have generated your Let's Encrypt certificates, they are located in /etc/letsencrypt/live//

    Copy the certificates

    Gitlab expects two files located in /etc/gitlab/ssl/

    There's something I'm not sure about, you may have to convert the .pem certificates using the answer at this location: Convert .pem to .crt and .key

    Copy the certificate from /etc/letsencrypt/live//cert.pem to /etc/gitlab/ssl/.crt

    Copy the private key from /etc/letsencrypt/live//privkey.pem to /etc/gitlab/ssl/.key

    Reconfigure

    Run gitlab-ctl reconfigure

提交回复
热议问题