Sources & Sync

GitHub setup

Connecting SXL Studio to GitHub: which token to create and with which permissions, how to fill in the connection form, test it and run the first synchronization.

The plugin talks to GitHub through the REST API with a Personal Access Token: you do not need git on your computer. Setup takes five minutes: create a token, fill in the connection form, test it, press Pull.

Step 1. Create a Personal Access Token

Open GitHub → Settings → Developer settings → Personal access tokens. Either token type works.

Fine-grained token (recommended by GitHub)

  1. Press Generate new token.
  2. Give it a name, for example SXL Studio, and an expiration.
  3. In Resource owner choose yourself or the organization that owns the repository.
  4. In Repository access choose Only select repositories and tick the token repository.
  5. In Repository permissions set Contents: Read and write. GitHub adds Metadata: Read-only automatically.
  6. Press Generate token and copy it: it is shown only once.

If the organization requires token approval, wait until an administrator approves it. Until then the connection gets a 404 error.

Classic token

  1. Press Generate new token (classic).
  2. Give it a name and tick the repo scope.
  3. Press Generate token and copy it.

The plugin recognizes the github_pat_… (fine-grained) and ghp_… (classic) formats. If you paste another kind of token or a truncated one, the connection check warns you.

A token is needed even for a public repository: without it the plugin can only read, and Push is unavailable.

Step 2. Prepare the repository

The repository must have at least one commit: an empty GitHub repository returns error 409, so create a README in it.

The folder structure the plugin expects:

your-repo/
├── tokens/          ← Tokens Path: token JSON and config.json
└── data/            ← Data Path: Database files (optional)

If the token folder does not exist yet, the plugin creates it on the first Push.

Step 3. Create the connection in the plugin

  1. Press the Sync settings gear in the plugin footer, then New Sync.
  2. Fill in the form:
FieldValue
ProviderGitHub
NameAny name, for example Design tokens
Repository (owner/repo)your-org/your-repo
BranchThe branch you work on, for example main
Access TokenThe token from step 1
Data Pathdata, or empty if there is no such folder
Tokens Pathtokens
  1. Press Test connection. The report should say Connection OK. If the plugin found that the branch or folders are named differently, press Fix to put the right values in.
  2. Press Save, then Use Git to make the connection active.

All form fields and checks are described on the Connecting a repository page.

Step 4. First synchronization

  1. Press Pull in the footer. The plugin loads tokens and data from the repository, and the folders appear in the file tree.
  2. Change any token and press Push: a window with the changed files and a commit message field opens. After Push the commit appears in the repository.

Next: Pull, Push and branches.

GitHub Enterprise Server

  1. Put the server address into Enterprise URL, for example https://github.company.com. The plugin adds the API path itself.
  2. Create the token on your server the same way as on github.com.
  3. If the organization uses SAML SSO, authorize the token for the organization: otherwise GitHub answers 403 and the plugin shows GitHub SSO authorization required.

If something does not work

MessageWhat to do
GitHub returned 404 for branch …Check the spelling of owner/repo and the branch. For a private repository the token must have access to that repository: a fine-grained token has it ticked in Repository access, a classic token has the repo scope. In an SSO organization authorize the token
GitHub repository … is empty (HTTP 409)Make the first commit in the repository
GitHub authentication failed (401)The token expired, was revoked or was not copied completely. Create a new one and paste it into the form
Token has read-only access to this repository: Push will failThe token cannot write. It needs Contents: Read and write
GitHub rate limit exceededThe API request limit. Wait a minute; the token does not need to change
Protected Branch on PushThe branch is protected by repository rules. Create another branch from the footer menu and work there

The full list of checks and errors: Connecting a repository. If the cause is unclear, open the Diagnostics tab and run test.

See also