Gitlab Pages: Something went wrong while obtaining the Let's Encrypt certificate

I’m trying to deploy a super simple HTML / CSS website on Gitlab Pages on my own hledamebyt.eu domain. HTTP version works fine, pipeline seems to be happy, website is served.

However, LE certificate cannot be automatically retrieved for some reason.

Something went wrong while obtaining the Let’s Encrypt certificate for hledamebyt.eu. [Retry button]

  • in project visibility settings, “Everyone” is setup for Gitlab Pages
  • domain is verified as my own
  • DNS records are setup with A record, alias and verification TXT records
  • no _redirects file is present
  • all requirements stated in docs seem to be satisfied

Repo structure:

$ tree -a -L 2
.
├── .git
│   ├── branches
│   ├── COMMIT_EDITMSG
│   ├── config
│   ├── description
│   ├── FETCH_HEAD
│   ├── HEAD
│   ├── hooks
│   ├── index
│   ├── info
│   ├── logs
│   ├── objects
│   ├── ORIG_HEAD
│   ├── packed-refs
│   └── refs
├── .gitlab-ci.yml
├── public
│   ├── assets
│   ├── images
│   └── index.html
└── README.md

.gitlab-ci.yml contents:

pages:
  stage: deploy
  script:
  - mkdir .public
  - cp -r * .public
  - mv .public public
  artifacts:
    paths:
    - public
  only:
  - main

Any ideas what might be wrong?

I think you’re best bet is to remove your custom domain, turn of SSL certificates, and then turn them back on and re-add your domain. If that doesn’t work, maybe consider raising a support ticket, if you’re on a paid plan.

If something has gone wrong between GitLab and LetsEncrypt, there isn’t much you can do about it from your repo, sadly, but you can start the process again and hope that it works a second time around.

2 Likes

I’ve tried that couple of times. HTTPS works fine without custom domain, however domain won’t receive the certificate.

Are you able to raise a support ticket?

No, Ma’am, I’m using free plan.

OK.

There are a few threads like this one on this topic. It seems to happen periodically.

It might be helpful if you can query your DNS and post the result here.

BTW do you have any other domains with GitLab pages? Did SSL work for any of them?

2 Likes

Finally! I’ve changed my DNS records couple of times, deleted IPv6 record, and now it works.

Yes, I have another Gitlab Page with LE certificate issued just fine.

Thank you for your help @snim2.

2 Likes

Really glad you got it sorted.

1 Like