Free for open source projects and schools. AI Council costs nothing for OSS maintainers and educational institutions. Apply →

Home / Docs / GitLab and GitHub

Connecting GitLab and GitHub

You need a forge connection to create projects from repositories, poll branches and publish review findings to merge requests. Forge requests run on behalf of the user who set up the connection.

Tokens

Tokens are stored encrypted, issued on demand, never shown again and never passed to the model. You can replace a saved value, but you can't view it.

GitLab

One OAuth application per user. Listing projects, polling branches and opening merge requests all run on that user's behalf.

What you need: permission to create an OAuth application in your GitLab (Settings → Applications) and the GitLab server address.

  1. Open the account menu → Git Forges, card 01 GitLab, the your application block.
  2. Create an application in GitLab with the redirect and scopes exactly as the form shows: api read_repository write_repository. The redirect is built from the installation address and may point to localhost on a fresh install. Check it against the address users open Council at, and fix the installation address before registering if needed.
  3. Fill in gitlab url, application id and secret in the form and save.
  4. Click the connect button and complete authorization in GitLab.

Card actions: TEST CONNECTION checks the connection, REPLACE APP replaces the application, REMOVE APP deletes it, DISCONNECT revokes the token. Projects created from the forge remain after disconnecting, but new commits stop arriving.

GitHub

One GitHub App per Council installation, registered by an administrator. Each user installs the app on their own accounts and organizations.

Registering the app (administrator)

  1. Create a GitHub App: Settings → Developer settings → GitHub Apps → New GitHub App. Set HOMEPAGE URL, CALLBACK URL and SETUP URL with "Redirect on update" checked. The values are shown on the card. Turn off "Request user authorization (OAuth) during installation" and Webhook.
  2. Enter app id and private key (pem) in Council.
  3. Save and click TEST CONNECTION.

Installing the app (each user)

  1. Click + ADD on card 02 GitHub.
  2. Install the app in GitHub on the account or organization you need.
  3. Finish the installation by following the Setup URL back to Council.

Troubleshooting

Message or symptomCause and fix
The redirect URI included is not validThe redirect in the GitLab application differs from the one shown in the form. Match the application by Application ID, not by name.
GitHub installation doesn't appear in the listThe installation is recorded only on return via the Setup URL. Install the app again and wait for the redirect back.
Forge is connected, but repositories aren't visibleThe application is missing scopes from the registration form. Fix the application and run TEST CONNECTION again.
GitHub rejects the saved valueThe wrong type of value was saved: you need the app's private key, not a personal access token or client secret.

Next: Projects

Made on
Tilda