Skip to content

Commit 0d7c9e7

Browse files
committed
Update README
1 parent 79b02db commit 0d7c9e7

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
11
# git-gateway - Gateway to hosted git APIs
2+
3+
**Secure role based access to the APIs of common Git Hosting providers.**
4+
5+
When building sites with a JAMstack approach, a common pattern is to store all content as structured data in a Git repository instead of relying on an external database.
6+
7+
Netlify CMS is an open-source content management UI that allows content editors to work with your content in Git through a familiar content editing interface. This allows people to write and edit content without having to write code or know anything about Git, markdown, YAML, JSON, etc.
8+
9+
However, for most use cases you won’t want to require all content editors to have a GitHub account with full access to the source code repository for your website.
10+
11+
Netlify’s Git Gateway lets you setup a gateway to GitHub’s API (more providers coming) that lets tools like Netlify CMS work with content, branches and pull requests on your users’ behalf.
12+
13+
The Git Gateway works with any identity service that can issue JWTs and only allows access when a JSON Web Token with sufficient permissions is present.
14+
15+
To configure the gateway, see our example.env file
16+
17+
The Gateway limits access to the following sub endpoints of the repository:
18+
19+
/repos/:owner/:name/git/
20+
/repos/:owner/:name/contents/
21+
/repos/:owner/:name/pulls/
22+
/repos/:owner/:name/branches/

example.env

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
GITGATEWAY_JWT_SECRET="CHANGE-THIS! VERY IMPORTANT!"
2+
23
GITGATEWAY_DB_DRIVER=sqlite3
34
DATABASE_URL=gorm.db
5+
46
GITGATEWAY_API_HOST=localhost
57
PORT=9999
8+
9+
GITGATEWAY_GITHUB_ACCESS_TOKEN="personal-access-token"
10+
GITGATEWAY_GITHUB_REPO="owner/name"
11+
12+
GITGATEWAY_ROLES="admin,cms" # leave blank to allow all roles

0 commit comments

Comments
 (0)