I just started using gitlab pages on gitlab.com for a public project. I also have a private repository I would like to restrict access to the generated pages to only those with access to the repository. Is that possible?
If not, are there any other supported authentication methods?
No, this is not possible. Pages are always visible not matter the project visibility level. If your project is private, people would have to guess the url anyway, so you could say it’s a level of restriction.
There is an issue for gitlab-ce (Community Edition) concerning Access Control for gitlab pages:
As of February 2018, this is not closed yet, but it doesn’t mean it’s “not possible”.
1. Gitlab pages behind your own private gitlab installation:
If you are using your own gitlab installation (not gitlab.com), and your gitlab installation is in a private network only accessible with a vpn, then only users behind that vpn will have access to your generated gitlab-pages.
2. Publish to a private server:
Another solution using gitlab.com would be to deploy your website somewhere online using gitlab-ci and use your own authentication system. Or you can upload generated content to a private AWS S3 bucket. Here’s an example of how to setup a S3 bucket with Authentication
The following guide will show you how to use gitlab-ci and the awscli to deploy your html files to AWS S3:
So in the end, I don’t think answering “No” is the right answer here.