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.
By using Netlify CLI you set it up to auto-deploy from Self-hosted/managed GitLab.
You'll need to configure SSH key and webhook integration. Here is a detailed guide: Auto Deploy to Netlify from Self-hosted GitLab
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With