Skip to main content
Multiple Omni models can share the same git repository. If you’re connecting a model to a repository that’s already connected to another model, you only need to complete the Omni-side setup—the repository’s deploy key and webhooks are already configured.

Requirements

To follow the steps in this guide, you’ll need: Refer to Bitbucket’s documentation for information about user permissions.

Setup

1

Retrieve the repository's SSH URL

  1. In your browser, navigate to the Bitbucket repository you want to connect to Omni.
  2. Click the Clone button near the top right corner of the page.
  3. In the modal that displays, click the HTTPS dropdown, then select SSH.
Keep this page open - you’ll need it in the next step.
2

Connect the repository to Omni

  1. In Omni, click Develop.
  2. Click the model you want to connect to git.
  3. In the model IDE, click Model > Git settings.
  4. You’ll be prompted to enter connection details for the repository:
    • Git Provider - Select from the dropdown.
    • SSH URL - Copy and paste the repository’s SSH URL from Step 1.
    • Base Branch - Enter the name of the default branch for the repository. Omni will default to main unless a different name is specified.
  5. Click Configure Git.
The page will update to display additional git settings, along with information for deploy keys and webhooks.
Connecting to a repository that’s already linked to another Omni model? Skip to Step 5 - the deploy key and webhooks are already configured.
3

Add a repository access key

  1. In the Bitbucket repository, click Repository settings.
  2. Click Access keys, located in the left navigation.
  3. Click Add key.
  4. Fill in the fields as follows:
    • Key - Copy the Public key from the Omni Git settings page and paste it into this field.
    • Permission - Select Write to allow Omni to push changes made in Omni to the repository
  5. Click Add key.
4

Add repository webhooks

  1. If the repository settings page isn’t still open, open it by clicking Repository settings in the left navigation.
  2. Click Webhooks, located in the Workflow section of the left navigation.
  3. Click Add webhook.
  4. Fill in the fields as follows:
    • Title - Enter a descriptive title, such as Omni Pull Request Webhook
    • URL - From the Omni Git settings page, copy the Payload URL and paste it into this field.
    • Secret - From the Omni Git settings page, copy the Webhook secret and paste it into this field.
  5. In the Triggers section, select Choose from a full list of triggers.
  6. Select only the Pull Request events:
    • Pull Request Created
    • Pull Request Updated
    • Pull Request Merged
  7. When finished, click Save.
5

Test the connection

To verify the setup, navigate back to the Git settings page in Omni. Click the Test git connection button near the top of the page to test the connection.

What’s next?

After the setup is complete, you can configure the integration’s behavior by changing its settings. Refer to the git integration settings reference for more information.