I have a Gatsby static site that is currently deployed via Zeit Now from a self-hosted Gitlab account.
I would like to add Netlify CMS, but it only seems to integrate with a Gitlab.com account.
Is it possible to use Netlify CMS with a self-hosted Gitlab account?
You will be able to use Netlify CMS with a self-hosted Gitlab server using Implicit Grant
As the docs show, your options are below for the backend
in the config.yml
file:
backend:
name: gitlab
repo: owner-name/repo-name # Path to your GitLab repository
auth_type: implicit # Required for implicit grant
app_id: your-app-id # Application ID from your GitLab settings
api_root: https://my-hosted-gitlab-instance.com/api/v4
base_url: https://my-hosted-gitlab-instance.com
auth_endpoint: oauth/authorize
On Gitlab: Setup an application on Gitlab to get the app_id
and to set the Redirect URI, enter the address where you access Netlify CMS, for example, https://www.example.com/admin/. For scope, select api
Update: It is recommended to use client-side PKCE Authorization now for Gitlab rather than Implicit Grant.