static-cms/website/content/docs/github-backend.mdx

31 lines
946 B
Plaintext
Raw Normal View History

2022-09-30 11:39:35 -04:00
---
title: GitHub
2022-11-04 17:41:12 -04:00
group: Backends
weight: 20
2022-09-30 11:39:35 -04:00
---
2022-11-04 17:41:12 -04:00
- **Name**: `github`
2022-09-30 11:39:35 -04:00
For repositories stored on GitHub, the `github` backend allows CMS users to log in directly with their GitHub account. Note that all users must have push access to your content repository for this to work.
## Authentication
2022-11-01 16:00:23 -04:00
Because Github requires a server for authentication, Netlify facilitates basic GitHub authentication.
2022-09-30 11:39:35 -04:00
To enable basic GitHub authentication:
1. Follow the authentication provider setup steps in the [Netlify docs](https://www.netlify.com/docs/authentication-providers/#using-an-authentication-provider).
2022-10-02 20:06:20 -04:00
2. Add the following lines to your Static CMS `config.yml` file:
2022-09-30 11:39:35 -04:00
```yaml
backend:
2022-11-04 17:41:12 -04:00
name: github
2022-09-30 11:39:35 -04:00
repo: owner-name/repo-name # Path to your GitHub repository
2022-11-01 16:00:23 -04:00
# optional, defaults to main
2022-09-30 11:39:35 -04:00
# branch: main
```
## Git Large File Storage (LFS)
2022-11-04 17:41:12 -04:00
Please note that the GitHub backend **does not** support [git-lfs](https://git-lfs.github.com/).