Search code examples
sslgitlablets-encrypt

GitLab SSL certificate error: No account exists


I am trying to setup a self-hosted GitLab instance, everything works except when I try to create a https connection using Let's encrypt. I get the following error when trying to reconfigure the GitLab instance:

There was an error running gitlab-ctl reconfigure:

letsencrypt_certificate[gitlab.***.org] (letsencrypt::http_authorization line 6) had an error: Acme::Client::Error::AccountDoesNotExist: acme_certificate[staging] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/resources/certificate.rb line 41) had an error: Acme::Client::Error::AccountDoesNotExist: No account exists with the provided key

My external_url=https://gitlab.***.org, and on my network I have set port forwarding for both port :80 and :443. I also set the DNS to my IP, this works as the site is reachable when not secured.

Hope someone recognizes the error, I looked all over and didn't see it pop up anywhere.

Best Regards


Solution

  • I had the same problem while I tried to change the url of my GitLab.

    I solved this issue thanks to : https://gbe0.com/posts/linux/server/gitlab-acme-account-does-not-exist/, by desactiving the old Acme private key then reloading GitLab config

    sudo mv /etc/acme/account_private_key.pem /etc/acme/account_private_key.pem.backup
    sudo gitlab-ctl reconfigure