---
title: "Code and repositories"
description: "How the platform reaches GitHub, and GitLab when a school uses it: to let a colleague pick their own repository, and to create one in the group you name."
url: "https://cyantula.app/docs/admin/apps/settings-code/"
updated: "2026-12-03"
---

For administrators

How the platform reaches GitHub, and GitLab when a school uses it: to let a colleague pick their own repository, and to create one in the group you name.

### What this is

Where the code of an app is kept and how cyantula reaches it. Here you set up GitHub (a GitHub App, or a personal access token) and GitLab, say where a brand-new app&#39;s repository is created, and choose the default provider for new repositories.

Both providers are optional and independent. Without either, colleagues can still publish a public repository, a zip or a single page. With them, colleagues connect their own account, pick their own repositories, and cyantula can create repositories and open changes as pull requests or merge requests.

### Where to find it

1. Open , then the card .
2. Click .

### What you see

When both providers are set up, the top of the page shows **Default provider for new repositories** with the choices **GitHub** and **GitLab**. It says where a new repository or an uploaded zip goes when a colleague does not choose. With only one provider set up, that one is used and the question is not shown.

A table with the columns **Provider**, **Status** and **New repositories go to**, and a **Configure** button per row:

- (GitHub App) and (OAuth + bot token).
- is or . GitHub counts as set up with an App ID and private key, or with a personal access token. GitLab counts as set up once it has an address.
- shows the organisation or group, or .

Under it: **Colleagues can connect each provider that is set up with their own account.**

**Configure**, or a click on the row, opens a side panel with the tabs **Connection**, **Destination** and, for GitHub, **Advanced**. The panel has its own **Save** and **Close**. Saving there saves every change on the page.

#### GitHub, tab Connection

- A prompt with : paste it into an AI that can use the GitHub CLI and a browser. It creates this cyantula&#39;s GitHub App and hands back the values below.
- : asks GitHub whether the key, the App ID, the permissions and the installation fit together. It is disabled until you save ().
- : the App&#39;s numeric ID. The help under it gives the callback URL to register on the App.
- : the whole file the App generated, including the BEGIN and END lines. Choose the file, drop it on the box, or paste it.
- and : from the App&#39;s page. They let each colleague connect and see only their own repositories.
- : the App&#39;s URL name, so the portal can offer the link to install it on your organisation.

#### GitHub, tab Destination

- : the organisation login, for example . Empty means existing repositories can still be published, but none can be created.

#### GitHub, tab Advanced

- : the same key, base64-encoded. When set, it wins over the PEM.
- : used when there is no GitHub App, to create repositories, upload versions and clone. A fine-grained token needs Administration (write) to create, Contents (read and write) and Pull requests (read and write).
- : how often a deployed branch is checked for new commits, for repositories where no webhook could be installed.
- : how often GitHub is asked which pull requests are waiting for an owner. It repairs a webhook delivery that never arrived. 0 means webhooks only.

Both poll intervals are live after the next restart of the gateway, as the note under them says.

#### GitLab, tab Connection

- : one GitLab for the installation, for example or your school&#39;s own. Required before GitLab connect is offered. Empty keeps GitHub only.
- and : from an application registered on that same GitLab. Each colleague connects their own account with it. The help gives the callback URL and the scopes to register: , , , .
- : creates projects, adds the owner as a Developer, installs the push webhook, and pushes zip uploads and agent commits.
- : optional, for a private certificate authority. Paste it with its BEGIN and END lines. There is no switch to skip certificate checks.

#### GitLab, tab Destination

- : the id or the full path of the group where a brand-new project is created, for example . Empty means existing projects can still be published, but none can be created. Subgroups are included when colleagues pick a project.

### How to set up GitHub with a GitHub App

1. Pick the GitHub organisation that will own the App and hold new repositories.
2. Create the App there. The quickest way is the prompt on this page: click on and then , and paste it into an AI that can use the GitHub CLI and a browser. It creates the App and hands back the values. By hand, use Developer settings, GitHub Apps, New GitHub App, with the callback URL shown under , and generate a client secret and a private key.
3. Install the App on the organisation, on all repositories or on the ones cyantula should manage.
4. On , fill in , , , and .
5. On , fill in .
6. Click . You see
7. On , click .

You know it worked when the test says **The GitHub App works: cyantula can create repositories and act on them.** and the status shows **Connected**. The test lists its steps, each **ok**, **check**, **fails** or **not tested**: the App ID, whether the private key can be read, the client ID and secret, **GitHub accepts the key for this App ID**, **The App asks for the permissions cyantula needs**, **Installed on the organisation for new repositories** and **An installation token can be issued**. A failing step explains itself, and offers **Fix on GitHub** where GitHub is the place to fix it.

### How to set up GitHub with a token

Use this when you cannot create an App.

1. On GitHub, create a fine-grained personal access token with the permissions listed under . It must be allowed to create repositories in your organisation.
2. In the portal, click on , tab .
3. Paste the token into .
4. On , fill in .
5. Click . The status shows .

Actions on GitHub are then done as the token&#39;s owner.

### How to set up GitLab

1. On your GitLab, register an application for cyantula, with the callback URL and the scopes shown under . Copy the application ID and the secret.
2. Optional, but you want it: make a bot token. On GitLab Premium or Ultimate, make a group access token on the group, role Maintainer, scopes and . On the Free tier group access tokens do not exist: use a personal access token of a dedicated GitLab user who is Owner or Maintainer of the group, with the same scopes.
3. In the portal, click on . Fill in , , and, if you made one, .
4. If your GitLab uses a private certificate authority, paste it into .
5. On , fill in .
6. Click .

The status shows **Connected**. Colleagues can then connect their own GitLab account. Without the bot token and the group, they can publish projects that already exist, but cyantula cannot create new ones.

### How to choose the default provider

1. Set up both providers. The question only appears then.
2. Under , choose or .
3. Click .

### When something looks wrong

- Each refused field says why. Fix it and save again.
- Click , then run the test again.
- Fix that step first. If GitHub refuses the signature, the key belongs to another App, the App ID is wrong, or the key was deleted: generate a new private key on the App&#39;s page and paste it. If the App is not installed on the organisation, an owner of the organisation installs it and grants all repositories.
- Status on GitLab: the is empty.
- A colleague cannot create a new repository: check that or is filled in. The table shows in that case.

### Good to know

- Only admins can change these settings. A saved value is in force on the next request.
- Without the GitHub App, GitHub does not announce a push at once, so cyantula notices a new version a few minutes later.
- A secret field never shows its value. It shows . Leave it empty to keep it. Saving an emptied secret removes it.
- Apps whose code lives on this server, rather than on GitHub, are moved under .
