gpt4 book ai didi

服务主体的 Azure Databricks Git 凭据

转载 作者:行者123 更新时间:2023-12-02 06:11:52 25 4
gpt4 key购买 nike

我想使用Git reference创建一个Databricks作业对于 Azure Devops 存储库,理想情况下,引用将使用服务主体的 git 凭据。 Adding the service principal to the Databricks workspace很简单,就像adding the service principal to the Azure Devops repo一样。配置服务主体应使用的 git 凭据不太简单。根据git credentials API文档中,git_provider 参数可以是;

Service principals can't create tokens, like personal access tokens (PATs) or SSH Keys. They can generate their own Azure AD tokens and these tokens can be used to call Azure DevOps REST APIs.

  • azureDevOpsServicesAAD:运行作业时,Databricks 会产生以下错误;

Run result unavailable: run failed with error message Failed tocheckout Git repository: PERMISSION_DENIED: Invalid Git providercredentials. Go to User Settings > Git Integration to ensure that:

  1. You have entered a username with your Git provider credentials.
  2. You have selected the correct Git provider with your credentials.
  3. Your personal access token or app password has the correct repo access.
  4. Your personal access token has not expired.
  5. If you have SSO enabled with your Git provider, be sure to authorize your token.

Azure Databricks 支持服务主体 git 凭据还是我做错了什么?

最佳答案

要在 Databricks 中配置 git 凭据,您可以按照文档 here 进行操作。 。您需要首先在 .databrickscfg 文件中设置 AD token ,然后运行命令:

databricks git-credentials create <git-provider-short-name> --git-username <git-provider-user-name> --personal-access-token <git-provider-access-token> -p <profile-name>

在本例中,git-provider-access-token 是您的 git token ,而不是 AD token 。

git-provider-short-name 是以下之一:

  • 对于 GitHub,请使用 GitHub。
  • 对于 Azure Pipelines,请使用 AzureDevOpsServices。
  • 对于 GitLab CI/CD,请使用 GitLab。

关于服务主体的 Azure Databricks Git 凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76305845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com