GitHub Setup
Step-by-step guide to connecting SXL Studio to GitHub: creating a token, configuring the repository, and first sync.
Step-by-step GitHub setup
Step 1 — Create a Personal Access Token
- Go to GitHub Settings → Developer Settings → Personal Access Tokens
- Choose Fine-grained tokens (recommended) or Tokens (classic) (legacy fallback)
SXL Studio uses the GitHub REST API (branches, git refs, trees, commits, contents), so the token must allow read/write repository contents.
Fine-grained token (recommended)
- Click Generate new token
- Set a name:
SXL Studio - Set Resource owner (your user or your organization)
- Set Repository access:
- Recommended: Only select repositories and choose your repo
- Or All repositories if your workflow requires it
- Under Repository permissions, set:
- Contents:
Read and write - Metadata:
Read-only
- Contents:
- Optional: if your token path includes
.github/workflows, also set Workflows:Read and write - Click Generate token
- Copy the token — it's shown only once
- If your organization requires approval, wait until token status is not
pending
Classic token (legacy)
- Click Generate new token (classic)
- Set a name:
SXL Studio - Select scope:
repo(full repository access) - Click Generate token
- Copy the token
GitHub recommends fine-grained tokens. Some organizations block classic tokens completely.
Creating a Personal Access Token in GitHub
Step 2 — Prepare the repository
Make sure the repository has folders for data and tokens (or they'll be created on first Push):
your-repo/
├── data/ ← Data Path
│ ├── users.json
│ └── products.csv
├── tokens/ ← Tokens Path
│ ├── colors.json
│ ├── spacing.json
│ └── config.json
└── README.md
Step 3 — Create a connection in the plugin
- Open SXL Studio → Sync panel
- Click New Sync
- Fill in the form:
| Field | Value |
|---|---|
| Provider | GitHub |
| Name | My Design System |
| Repository | your-org/your-repo |
| Branch | main |
| Access Token | Paste the token from step 1 |
| Data Path | data |
| Tokens Path | tokens |
- Click Save
Step 4 — First sync
- Click Pull — the plugin downloads files from the repository
- Verify that data and tokens appeared in the plugin
- Try Push — confirm that writing works
- (Optional) Open branch menu and test:
- Create Branch (from current branch)
- Create Branch From... (from another branch), then Pull
Complete GitHub connection setup
GitHub Enterprise Server
For self-hosted GitHub Enterprise:
- In the Enterprise URL field, enter your server's base URL:
https://github.company.com - The plugin automatically appends
/api/v3for the REST API - Create the token on your Enterprise server the same way
- If your enterprise uses SAML SSO, authorize the token for your organization before Pull/Push
Troubleshooting
"Not Found" on Pull/Push
- Check that
owner/repois correct (case-sensitive) - Make sure the token has access to this repository
"Unauthorized"
- Token has expired or lacks the needed permissions
- For fine-grained: check Contents: Read and write
- For classic token + SSO organization: authorize token for SSO
"Conflict" on Push
- Someone already updated the file on remote
- Do a Pull → then Push
Token is valid but branch creation fails
- Re-check fine-grained permissions on the target repository
- Ensure you have rights to create branches in that repository (branch protection rules may block it)
Related sections
- Git — Integration — general overview
- GitLab Setup — alternative provider