Git

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

  1. Go to GitHub Settings → Developer Settings → Personal Access Tokens
  2. 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)

  1. Click Generate new token
  2. Set a name: SXL Studio
  3. Set Resource owner (your user or your organization)
  4. Set Repository access:
    • Recommended: Only select repositories and choose your repo
    • Or All repositories if your workflow requires it
  5. Under Repository permissions, set:
    • Contents: Read and write
    • Metadata: Read-only
  6. Optional: if your token path includes .github/workflows, also set Workflows: Read and write
  7. Click Generate token
  8. Copy the token — it's shown only once
  9. If your organization requires approval, wait until token status is not pending

Classic token (legacy)

  1. Click Generate new token (classic)
  2. Set a name: SXL Studio
  3. Select scope: repo (full repository access)
  4. Click Generate token
  5. 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

  1. Open SXL Studio → Sync panel
  2. Click New Sync
  3. Fill in the form:
FieldValue
ProviderGitHub
NameMy Design System
Repositoryyour-org/your-repo
Branchmain
Access TokenPaste the token from step 1
Data Pathdata
Tokens Pathtokens
  1. Click Save

Step 4 — First sync

  1. Click Pull — the plugin downloads files from the repository
  2. Verify that data and tokens appeared in the plugin
  3. Try Push — confirm that writing works
  4. (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:

  1. In the Enterprise URL field, enter your server's base URL: https://github.company.com
  2. The plugin automatically appends /api/v3 for the REST API
  3. Create the token on your Enterprise server the same way
  4. If your enterprise uses SAML SSO, authorize the token for your organization before Pull/Push

Troubleshooting

"Not Found" on Pull/Push

  • Check that owner/repo is 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)