cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Git Integration Configuration via Command Line or API

Dave_B_
New Contributor III

I have an Azure service principle that is used for our CI/CD pipelines. We do not have access to the Databricks UI via user logins. Our github repos also require SSO PATs. How can I configure the git integration for the service principal so that I can use the Repos API to sync notebooks to our Databricks instances via command line or API? I can connect to DB, list repos, etc., but I cannot create a repo because the service principal is not configured in DB to access our github repos. Note that the databricks repos create works fine if I use a personal repo because the PATs are not SSO which makes sense.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @David Benedictโ€‹, The Git credentials API allows users to manage their Git credentials to use Databricks Repos.

This section lists CLI requirements and describes how to install and configure your environment to run the CLI.

View solution in original post

5 REPLIES 5

Kaniz_Fatma
Community Manager
Community Manager

Hi @David Benedictโ€‹, Please go through this Databricks article and let us know if that helps.

Dave_B_
New Contributor III

I've read through that document several times previously and while it was helpful in getting me to the point where I could ask this question - it doesn't answer my question. I do not have access to the Databricks UI in our CI/CD deploymens. I need an API or CLI to configure that github integration (user and PAT). It looks like I can probably use the GIT credentials API to accomplish this, but that article doesn't cover it and I just managed to find it. Can you confirm? Are there any examples?

Hi @David Benedictโ€‹, Databricks Repos uses a personal access token (PAT) or an equivalent credential to authenticate with your Git provider to perform operations such as clone, push, pull etc. To use Repos you first need to add your Git PAT and Git provider username to Databricks. See Get a Git access token & connect a remote repo to Databricks.

You can clone public remote repositories without Git credentials (a personal access token and a username). To modify a public remote repository, or to clone or modify a private remote repository, you must have a Git provider username and personal access token with read and write permissions for the remote repository.

Dave_B_
New Contributor III

Yes, but how do I programmatically (via API or CLI) configure the git credentials in Databricks for the user?

Hi @David Benedictโ€‹, The Git credentials API allows users to manage their Git credentials to use Databricks Repos.

This section lists CLI requirements and describes how to install and configure your environment to run the CLI.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!