What does connecting a code host give me?
- People sign in to the console with their own account instead of a key.
- They scan branches of private repositories on Pre-Merge.
- Accept opens a fix pull or merge request as the person who accepted.
Pull request comments from CI are separate: they use your CI’s own token (CI and pull request comments).
How do I connect GitHub?
The engine creates your own private GitHub App in one click, owned by your organisation or personal account. Its keys go straight from GitHub to your engine’s data folder; they never pass through Tomosu, and Tomosu has no app that could reach your repositories. The app:
- asks for contents: write, pull requests: write, metadata: read, and nothing else;
- has no webhook, so GitHub sends the engine nothing on its own;
- is private, and installed only on the repositories you choose.
Open Connect → GitHub
As an admin (or with the start-up key), choose An organisation and type its name, or My personal account.
Create the app on GitHub
GitHub shows a new private app for that account. Press Create GitHub App.
Choose the repositories
Pick them and press Install & Authorize. You come back signed in.

Connect GitHub, connected.
Open the console at the address people use (for example https://tomosu.internal.example), because sign-ins come back to it.
tomosu connect github --org acme --console https://tomosu.internal.example
tomosu auth status
tomosu disconnect github # forget the app's keys (then delete the app on GitHub)
$ tomosu auth status
GitHub: connected, app tomosu-test owned by acme (http://127.0.0.1:7701/apps/tomosu-test)
This machine: not signed in (`tomosu login github`)
Engine http://localhost:7600: signed in with GitHub as octo, admin
The output above is from the demo, whose stand-in GitHub runs on port 7701. Run connect github with the engine’s data folder (--data-dir).
For GitHub Enterprise Server, set integrations.github.api (and integrations.github.web when it does not follow from the API address).
How do I connect GitLab or Bitbucket?
With an OAuth application you register on gitlab.com, a self-managed GitLab, or a Bitbucket Cloud workspace:
- Connect → GitLab (or Bitbucket). The page links to the host’s “new application” page and shows the callback address to paste.
- GitLab: scopes
apiandread_user, Confidential ticked. Bitbucket: a private OAuth consumer with Account: Read, Repositories: Write and Pull requests: Write. - Paste the application id (Bitbucket: key) and secret. The secret is kept in the engine’s state database and never shown again.

From a terminal, an admin connects it once; the secret is read from a file or standard input, never a flag:
tomosu connect gitlab --client-id <application id> --url https://gitlab.example.com --engine http://localhost:7600 < secret.txt
tomosu integrations test gitlab --engine http://localhost:7600
On GitLab, Accept opens a merge request set to merge when the pipeline succeeds; on Bitbucket, a pull request left for review. Disconnect (tomosu disconnect gitlab) deletes the secret and signs everyone out of that host.
Who may do what once it is connected?
| Action | Who |
|---|---|
| Look at anything | Anyone who can open the console |
| Accept or reject, edit rules, contribute | People with write (push) access to the finding’s repository |
| Settings, integrations, connect and disconnect | Admins: the logins in run.admins; when it is empty, repository admins |
| Anything, from scripts and CI | The start-up key or a named access key (Sign-in and access keys) |