Connect GitLab Pro
Add a GitLab personal access token for gitlab.com or your own GitLab server.
On this page
Temper works with gitlab.com and self-hosted GitLab, through the GitLab API, so the server doesn't need git installed. One token covers every theme and plugin on the site. Each project then picks its own GitLab project, branch and folder, and can live in nested groups, like group/subgroup/name.
Public projects pull and import without a token. You need one to commit, to pull private projects, to list your projects, and to create one.
Add a token#
- Go to Temper › Settings and open the GitLab tab.
- Set GitLab address. It's
https://gitlab.comby default. For your own server, enter its address, such ashttps://gitlab.example.com. - Follow create a token on your server. It opens GitLab's Preferences › Access tokens with the name and the
apiscope filled in. Create the token and copy it. - Paste it into Access token and click Save and test.
Temper checks the token with GitLab and shows "Connected to server as login with an access token".
You can paste the address with or without https://. Temper drops a trailing /api/v4, /users/sign_in or /explore if you copied one along.
Temper always talks to GitLab over https://, and only to public addresses. For a server on your own network, or on a port other than 80, 443 or 8080, define TEMPER_GITLAB_ALLOW_PRIVATE; for one without HTTPS, TEMPER_GITLAB_ALLOW_HTTP. See Constants.
Note
Changing the GitLab address to a different server removes the saved token, so it's never sent somewhere new. Paste a token for the new server in the same save.
Roles#
| To | You need |
|---|---|
| Pull or import a public project | No token |
| Pull a private project | A token that can read it |
| Commit | The Developer role or higher on the project |
| Create a project in a group | A role that may create projects there (Developer or Maintainer, depending on the group's settings) |
Check and disconnect#
- Check asks GitLab whether it still accepts the token. Temper also checks when the tab opens, and says so if the token has expired or been revoked.
- Disconnect removes the token from this site. It keeps working on GitLab until you revoke it there, under Preferences › Access tokens.
Next#
Link a repository to a theme or plugin, and pick GitLab as the host.