1

Classic GitLab Pages setup issue. Seems I face this every time I try to host a page on GitLab Pages.

GltLab Pages 401 - You don't have permission to access the resource.

This time though I forgot how to get past it. All settings look correct:

CloudFlare DNS Settings

I've turned off all HTTPS/TLS/SSL on the domain in Cloudflare just to give it an easier time connecting.

GitLab Pages setting is stuck on forcing HTTPS. No idea how this gets stuck like this?

GitLab Pages forcing HTTPS

More settings: GitLab Page 401 settings

enter image description here enter image description here

Any insight is greatly appreciated! Thank you.

Mikeumus
  • 3,570
  • 9
  • 40
  • 65

2 Answers2

1

Missing gitlab-ci.yml

image: alpine:latest

pages:
  stage: deploy
  script:
  - echo 'Nothing to do...'
  artifacts:
    paths:
    - public
  only:
  - master

Also, a public/ folder not the root is required. See How to deploy plain-html site on GitLab Pages

Try adding gitlab-ci.yml and public/ or create from repo from a GitLab Template: https://docs.gitlab.com/ce/user/project/pages/getting_started/pages_new_project_template.html

Like this one: https://gitlab.com/pages/plain-html

Mikeumus
  • 3,570
  • 9
  • 40
  • 65
0

If the gitlab-ci.yml is ok this happen because a bug (at least in my self hosted).

If you launch the custom domain creation before to create the CNAME DNS records then it fails the first time and then is not capable to do the Let's Encrypt validation.

Note: In my setup is not required to validate the domain, only the CNAME records.