Syncing to Azure DevOps
You can sync your Modelbit git repo to a repo in your company's Azure DevOps account. This is especially valuable for using your Azure Devops-based code review, CI/CD and Pull Request workflows on your Modelbit deployments.
This workflow requires you to have admin permissions within your Azure DevOps project.
You should create a new, empty git repository for Modelbit.
Adding your Azure DevOps repo URL to Modelbit
First, make a new repo inside your Azure Devops account.
- In
Project Settings
, clickRepositories
- On the right, click
+ Create
- Make sure the type is
Git
and set the name tomodelbit
. - Leave the
Add a README
checked. - Click
Create
at the bottom.
Make sure to leave the Add a README
box checked. Below it you'll see the message "Your repository will be initialized with a main
branch". This is necessary for Modelbit to connect.
Once created, open the repository by clicking the row in that table, then clicking Browse
.
Copy the SSH
URL for your repository. It will look like git@ssh.dev.azure.com:v3/<your-org-and-repo>
.
Head back to Modelbit:
- In
Settings
, open theGit Settings
page. - Click the
Azure
button, then clickNext
. - Paste in the URL of your Azure DevOps repo and click
Next
.
Before heading back to Azure DevOps, copy the SSH Public Key
. This 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.
Adding your Modelbit Public Key to Azure DevOps
Back in your repo in Azure DevOps, under the SSH
URL is a link called Manage SSH Keys
. Click it, then:
- On the top-right, click
+ New Key
- Give it a memorable name like
Modelbit Integration
- Paste in the Modelbit Public SSH Key in the
Public Key Data
field
Click Add
.
Head back to Modelbit, click Next
, and Modelbit will test the connection to Azure DevOps. If the Public Key has been set and no branch protection rules prevent Modelbit from syncing with the repo, you're all set.
Now Modelbit will sync to your Azure DevOps repo, allowing you to use Pull Requests for merges, and all your Azure DevOps-based tools for CI/CD, code review and more!
Do not use git clone
with this repository, use modelbit clone
. The modelbit clone
command will git clone
your repo and configure it to handle binary files like pkl
s.