Skip to main content

Syncing to GitHub

You can sync your Modelbit git repo to any GitHub repo, including your company's GitHub repo. This is especially valuable for using your GitHub-based code review, CI/CD and Pull Request workflows on your Modelbit deployments.

Adding your GitHub repo URL to Modelbit

First, copy the URL of your GitHub repo. If you're unsure which GitHub repo to use, it may make sense to create a blank one for Modelbit.

From the "Code" tab of your GitHub repo, click the green "Code" button and copy out the URL.

In Modelbit, in the "Git branches" page of "Settings", click "Add Git Remote" in the "Remote Git Repository" section of the page. Paste the URL of the GitHub repo.

Copy the key deploy key out of the dialogue. This deploy key is Modelbit's public key for pushing and pulling your Git repo, just like a user's public key. It is not a secret. Click "Connect Remote".

Adding your Modelbit deploy key to GitHub

In GitHub, click the "Settings" tab of your repo. On the left hand side, click "Deploy keys". On the upper right of this page, click "Add deploy key". Paste the Modelbit deploy key. Give it a memorable name like "Modelbit integration". Make sure to check the "Allow write access" box and click save.

Now Modelbit will sync to your GitHub repo, allowing you to use GitHub Pull Requests for merges, and all your GitHub-based tools for CI/CD, code review and more!