GitLab

Integrating with GitLab / GitLab EE / GitLab CE allows you to use it as a Git hosting provider in your Buddy projects.

Register a GitLab OAuth app

  1. Sign in to your Buddy self-hosted instance as admin.
  2. Add a new project and select GitLab as the provider.
  3. Click Configure GitLab app and copy the Authorization Callback URL.

Image loading...

  1. In GitLab, go to User Settings → Applications and fill in the details of your OAuth app:

    • Name → anything, eg. Buddy
    • Redirect URI → paste the Callback URL copied from Buddy self-hosted
    • Scopes → a selection of scopes required for your usecase, cannot be empty
  2. Click Register OAuth Application.
  3. Copy the Client ID and Client Secret from the application details and paste them into the corresponding fields in Buddy.

Image loading...

  1. If you're integrating with GitLab EE / GitLab CE, provide the adress of the instance.
  2. Click Save changes and restart Buddy to apply the changes.

Webhook redirection on non-public-instances

If your instance is not publicly available, follow these instructions to ensure that webhooks from GitLab are successfully reaching Buddy:

  1. Go to the settings of your GitLab App: https://$INTERNAL_BUDDY_IP_ADDRESS/settings/apps/GIT_LAB.
  2. Set the Public URL of this Buddy instance to the public address of your network with a custom port.
  3. On your router, redirect the public address and port to $INTERNAL_BUDDY_IP_ADDRESS:80.
Tip
If your commits are now showing up in Buddy, go to the Code tab, and click Manual fetchFetch missing commits. This will update the webhook URL in the GitLab repository. Image loading...Fetching missing commits

Last modified on Sep 24, 2024