cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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

Kaniz
Community Manager
Community Manager

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
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?

Kaniz
Community Manager
Community Manager

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?

Kaniz
Community Manager
Community Manager

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.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.