title: gitlab runner - x509: certificate signed by unknown authority
body: <p>Well, I am trying to run gitlab-runner on my PC, which should be connected to our Gitlab on the server.</p>
  
  <p>I am getting</p>
  
  <pre><code>ERROR: Registering runner... failed                 runner=XXXXXX status=couldn't execute POST against https://XXXXXXXXXX/api/v4/runners: Post https://XXXXXXXXXX/api/v4/runners: x509: certificate signed by unknown authority
  PANIC: Failed to register this runner. Perhaps you are having network problems
  </code></pre>
  
  <p>I ran through different advices, but nothing really changed.</p>
  
  <p>My current setup is self-signed ceritificate generated by</p>
  
  <pre><code>wget "https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem.txt" -O "/Users/admin/gitlab-runner-certs/fs-tul-letsencrypt.pem"
  </code></pre>
  
  <p>(I also tried <a href="https://futurestud.io/tutorials/how-to-run-gitlab-with-self-signed-ssl-certificate" rel="nofollow noreferrer">https://futurestud.io/tutorials/how-to-run-gitlab-with-self-signed-ssl-certificate</a>),</p>
  
  <p>script for gitlab-runner registration</p>
  
  <pre><code>#!/usr/bin/env bash
  
  # tried also without sudo
  sudo gitlab-runner register \
        --non-interactive \
        --registration-token OUR_GITLAB_TOKEN \
        --url OUR_GITLAB_HOST_URL \
        --tls-ca-file /Users/admin/gitlab-runner-certs/fs-tul-letsencrypt.pem \
        --executor docker
  </code></pre>
  
  <p>And I am still getting that error. Any idea?</p>
  
  <p>I also did not change anything on server side. Shouldn't I do anything there? (I did not find any mention about it, but still asking)</p>
  
  <p>PS: <a href="https://stackoverflow.com/questions/55622960/gitlab-runner-x509-certificate-signed-by-unknown-authority">gitlab-runner x509: certificate signed by unknown authority</a> did not fix my problem</p>