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
- Go to GitLab → User Settings → Access Tokens (or
/‑/profile/personal_access_tokens) - Click Add new token
- Set a name:
SXL Studio - Set expiration according to your policy
- 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
- Click Create personal access token
- 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
- Open SXL Studio → Sync panel
- Click New Sync
- Fill in the form:
| Field | Value |
|---|---|
| Provider | GitLab |
| Name | My Design System |
| Repository | design-team/tokens or 12345 |
| 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
- Check the data in the plugin
- Try Push to verify writing works
- (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:
- In the Enterprise URL field, enter the base URL:
https://gitlab.company.com - The plugin automatically appends
/api/v4for the REST API - Create the token on your server the same way
- 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
apiscope and update the connection
Related sections
- Git — Integration — general overview
- GitHub Setup — alternative provider