- SSH authentication — Uses a deploy key and webhooks to connect Omni to your repository. This is the traditional method and requires configuring both a deploy key and a webhook in GitHub.
- HTTPS token authentication — Uses a GitHub fine-grained access token to authenticate. This method is simpler to set up because it doesn’t require deploy keys or webhooks.
Requirements
To follow the steps in this guide, you’ll need:- Omni Connection Admin permissions for the model you want to connect to git
- An existing repository
- Permissions in that allow you to:
Setup
Click the tab for the authentication method you want to use to view setup instructions.
- SSH authentication
- HTTPS token authentication
Retrieve the repository's SSH URL
- In your browser, navigate to the GitHub repository you want to connect to Omni.
- Click the Code button.
- In the modal that displays, locate the SSH option.
Connect the repository to Omni
- In Omni, click Develop.
- Click the model you want to connect to git.
- In the model IDE, click Model > Git settings.
- You’ll be prompted to enter connection details for the repository:
- Authentication Method - Select SSH (Deploy Key) 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
mainunless a different name is specified. - Git follower - Select this option if the repository should be treated as a follower.
- Click Configure Git.
Add a repository deploy key
- In the GitHub repository, click the Settings tab.
- Click Deploy keys, located in the Security section of the left navigation.
- Click Add deploy key.
- Fill in the fields as follows:
- Title - Enter a descriptive title to help you identify what the key is used for. For example, Omni Snowflake Model
- Key - Copy the Public key from the Omni Git settings page and paste it into this field.
- Allow write access - Check this box, which will allow Omni to push changes made in Omni to the repository
- Click Add key.
Add repository webhooks
- The repository settings page should still be open in GitHub. If not, re-open it.
- Click Webhooks, located in the Code and automation section of the left navigation.
- Click Add webhook.
- Fill in the fields as follows:
- Payload URL - From the Omni Git settings page, copy the Payload URL and paste it into this field.
- Content type - Select the application/json option.
- Secret - From the Omni Git settings page, copy the Webhook secret and paste it into this field.
- In the Which events would you like to trigger this webhook? section:
- Click Let me select individual events.
- Select the Pull request event.
- If the Push event is selected, deselect it.
- When finished, click Add webhook.