Let's encrypt error on local domain or self-signed certificate

when run
gitlab-ctl reconfigure
get an error

letsencrypt_certificate[tst.loc] (letsencrypt::http_authorization line 5) had an error: OpenSSL::PKey::RSAError: acme_certificate[staging] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/resources/certificate.rb line 25) had an error: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: nested asn1 error
Running handlers complete
Chef Client failed. 33 resources updated in 42 seconds
  • What version are you on (Hint: /help) ?
    it’s self-managed.
 GitLab:       12.7.6-ee (32aad7c42f1)
 GitLab Shell: 11.0.0
 PostgreSQL:   10.9

where is the wrong?

  1. It’s local domain so why need to run let’s encrypt as (.loc,.local,*.lan etc)
  2. how gitlab-ctl reconfigure understand that I’m using self-signed cert or manually cert.
    the reference :
    Best Regards

I was able to disable it, by adding at /etc/gitlab/gitlab.rb
letsencrypt['enable'] = false
but still wondering why need to run when there is local domain!?
Best Regards