โ11-09-2022 05:58 PM
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.
โ11-15-2022 01:57 AM
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.
โ11-13-2022 12:32 PM
Hi @David Benedictโ, Please go through this Databricks article and let us know if that helps.
โ11-13-2022 08:51 PM
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?
โ11-13-2022 10:19 PM
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.
โ11-14-2022 11:04 AM
Yes, but how do I programmatically (via API or CLI) configure the git credentials in Databricks for the user?
โ11-15-2022 01:57 AM
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.
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!