Deploy from GitLab
Eurobase deploys from a repository on gitlab.com or on your own GitLab server, the same way it does from GitHub: every push to the branch your Eurobase project deploys starts a deployment. You link the repository once with a read-only access token, so Eurobase can download your code, and a webhook, so GitLab tells Eurobase about each push.
Before you start
- Only the workspace owner can link repositories.
- The repository has at least one commit.
Step 1: Add the repository
- In Eurobase, open Git in the sidebar.
- Under GitLab and Forgejo, select Add repository.
- Paste the repository’s HTTPS URL, such as
https://gitlab.com/team/app, into Repository URL and select Continue.
Step 2: Create a read-only token
Select Open token settings in Eurobase to open the right page on your Git host. Create the token as described below, copy it, paste it into Access token in Eurobase and select Connect. Your Git host shows the token only once.
On gitlab.com, project access tokens need a paid plan, so create a legacy personal access token with the scopes read_api and read_repository, and an expiration date.
This token can read every repository of its account, so Eurobase asks you to confirm that. To limit what it can read, create the token on an account that sees only the repositories you deploy.
On a self-managed GitLab, create a project access token with the role Reporter and the scopes read_api and read_repository. It reads only this repository.
Step 3: Add the webhook
After Connect, Eurobase shows a URL and a secret. Fill in the webhook form on your Git host with these values and leave every other field as it is.
Select Open webhook settings in Eurobase, then Add new webhook.
| Field | Value |
|---|---|
| URL | The URL from Eurobase |
| Secret token | The secret from Eurobase. Ignore Signing token. |
| Trigger | Push events |
| Save | Add webhook |
GitLab marks Secret token as not recommended because it prefers its own signing token. Eurobase checks the secret token, which is sent only over HTTPS.
Step 4: Confirm the first push
The repository shows Waiting for first push until Eurobase receives a delivery it can verify. Push a commit, or next to the webhook on GitLab, select Test, then Push events.
The status becomes Connected.
Step 5: Deploy from it
- Open your project’s Deployments and choose the repository under Repository.
- Choose the Branch and, in a repository with several apps, the Root directory.
- Select Save and Deploy. From then on, every push to that branch deploys.
If something doesn’t work
- Waiting for first push. Check the webhook’s recent deliveries on your Git host. If they failed, select Set up webhook next to the repository in Eurobase and paste the URL and the secret again.
- Use a read-only token. The token can write. Create one with read permissions only.
- The token can’t read this repository. The token was created for another repository or account.
- Push a commit to the repository first. The repository is empty.
- Stuck? Write to support@eurobase.dev.