Git

GitLab Setup

Step-by-step guide to connecting SXL Studio to GitLab: creating a token, configuring the project, and first sync.

Step-by-step GitLab setup

Step 1 — Create a Personal Access Token

  1. Go to GitLab → User Settings → Access Tokens (or /‑/profile/personal_access_tokens)
  2. Click Add new token
  3. Set a name: SXL Studio
  4. Set expiration according to your policy
  5. Set scopes:
    • api — required for full SXL Studio Git Sync (Pull, Push, branch list/create)
    • Optional read-only setups can use read_api / read_repository, but Push and branch operations may be unavailable
  6. Click Create personal access token
  7. Copy the token — it's shown only once

SXL Studio uses GitLab REST API, not Git-over-HTTPS commands. For normal day-to-day sync use api.

Token formats and alternatives

  • Standard personal tokens usually have glpat- prefix.
  • If your organization prefers service tokens, SXL Studio also works with project/group access tokens as long as they can access the target project through API.
Creating a Personal Access Token in GitLab

Step 2 — Determine the project path

In GitLab, a repository is identified by project path or numeric Project ID:

  • Path: namespace/project-name (e.g. design-team/tokens)
  • Project ID: number from Settings → General page (e.g. 12345)

Both work in the Repository field.

Step 3 — Create a connection

  1. Open SXL Studio → Sync panel
  2. Click New Sync
  3. Fill in the form:
FieldValue
ProviderGitLab
NameMy Design System
Repositorydesign-team/tokens or 12345
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
  2. Check the data in the plugin
  3. Try Push to verify writing works
  4. (Optional) Validate branch workflow:
    • Create Branch (from current branch)
    • Create Branch From... (from another branch), then Pull
Complete GitLab connection setup

Self-hosted GitLab

For your own GitLab server:

  1. In the Enterprise URL field, enter the base URL: https://gitlab.company.com
  2. The plugin automatically appends /api/v4 for the REST API
  3. Create the token on your server the same way
  4. If your server enforces PAT expiration/rotation, update the token in Sync settings before it expires

Troubleshooting

"Not Found"

  • Check the project path or Project ID
  • Make sure the token has access to the project

"Unauthorized" or "Forbidden"

  • Check token scope: for full sync it should include api
  • For self-hosted: verify the Enterprise URL is correct

Project in a subgroup

  • Use the full path: group/subgroup/project

Pull works, Push fails

  • Most often this means token is read-only (read_api / read_repository)
  • Recreate token with api scope and update the connection