Password protect GitLab pages with htpasswd [duplicate]
Asked Answered
U

1

5

Is there a way to password protect a website published using GitLab pages?

I tried adding an .htpasswd file to the root of the /pages directory, but that just makes the file available to everyone who goes to https://username.gitlab.io/mysite/.htpasswd.

Uria answered 12/12, 2016 at 17:33 Comment(4)
hi, did u find any solution?Monodic
its not wise to make a .htpasswd file accessible by the web. did you find any solution to password protect the gitlab pages project?Monodic
@Monodic I couldn't find a solution that didn't involve using AWS or Heroku. But this feature may be added to GitLab EE at some point in the future: gitlab.com/gitlab-org/gitlab-ee/issues/624.Uria
To expand on the Heroku option, you could check out jekyll-auth.Uria
E
3

GitLab now supports access control for pages in case of self managed GitLab instances:

https://docs.gitlab.com/ce/administration/pages/#access-control

Pages access control is currently disabled by default. To enable it, you must:

  1. Enable it in /etc/gitlab/gitlab.rb

    gitlab_pages['access_control'] = true

  2. Reconfigure GitLab

Eadith answered 31/10, 2018 at 0:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.