Skip to main content

Syncing to GitHub

You can sync your Modelbit git repo to a repo in any GitHub account, including your company's GitHub account. 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, make a new GitHub repo inside your GitHub account. While Modelbit may work with any repo, it is strongly recommended to create a blank one for Modelbit to avoid conflicts with other tools and systems.

Once created, 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!