04-14-2022 08:42 AM
I'm looking to automate the creation of Top Level repositories in Databricks however isn't possible using cli or API if this repo is private repository(Azure DevOps Repository) because require setup the token in user setting.
databricks repos create \
--url https://<orgname>:<PAT_token>@dev.azure.com/<orgname>/<projectname>/_git/<reponame>; \
--provider azureDevOpsServices \
--path /Repos/Repository/<reponame> \
--debug
That's a problem because use a git command like git clone with the same structure works without problems.
git clone https://<orgname>:<PAT_token>@dev.azure.com/<orgname>/<projectname>/_git/<reponame>;
Someone with any idea to solve this challenge?
05-21-2022 06:31 AM
We have API availabe for repos https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/get-repos also we are currently supporting SP.
Step 1: As an admin Create a Service Principal
Use this API SCIM API 2.0 (ServicePrincipals) | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 2: As an admin create a Databricks token on behalf of the Service Principal
Use this API:
Token Management API 2.0 | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 3: Using the Service Principal Databricks Token call the Git Credentials API
Add the Git token via this API: Git Credentials API 2.0 | Databricks on AWS
Step 4: Invoke Repos APIs as service principal using the SPNs Databricks Token
Related stackoverflow questions: Databricks REST API call for updating branch error : User Settings > Git Integration to set up an Az...
04-19-2022 12:46 AM
Hi @Luis Arias , Are you facing issues in creating a PAT?
To Create a PAT, Please follow the steps given in this article.
For example, to create a token to enable a build and release agent to authenticate to Azure DevOps Services, limit your token's scope to Agent Pools (Read & manage). To read audit log events, and manage and delete streams, select Read Audit Log, and then select Create.
Warning:-
Treat and use a PAT like your password and keep it a secret.
Use your PAT anywhere your user credentials are required for authentication in Azure DevOps.
04-19-2022 03:04 AM
Thanks @Kaniz Fatma , I don't have problem creating PAT, the issue it's create the repo in databricks including the PAT.
PD: Take the consideration I don't wanna use Databricks user setting because everything it's deployed by command line.
Regards,
Luis
05-11-2022 04:39 AM
Hi @Luis Arias , I suppose you need to raise a feature request.
05-21-2022 06:31 AM
We have API availabe for repos https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/get-repos also we are currently supporting SP.
Step 1: As an admin Create a Service Principal
Use this API SCIM API 2.0 (ServicePrincipals) | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 2: As an admin create a Databricks token on behalf of the Service Principal
Use this API:
Token Management API 2.0 | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 3: Using the Service Principal Databricks Token call the Git Credentials API
Add the Git token via this API: Git Credentials API 2.0 | Databricks on AWS
Step 4: Invoke Repos APIs as service principal using the SPNs Databricks Token
Related stackoverflow questions: Databricks REST API call for updating branch error : User Settings > Git Integration to set up an Az...
06-13-2022 02:44 PM
Hi @Luis Arias,
Just a friendly follow-up. Did Atanu's response help you to resolved your question? please let us know
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.