<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Updating databricks git repo from github action - how to in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/updating-databricks-git-repo-from-github-action-how-to/m-p/97612#M2233</link>
    <description>&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;It seems like the issue you're encountering is related to missing Git provider credentials when trying to update the Databricks repo via GitHub Actions. Based on the context provided, here are a few steps you can take to resolve this issue:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="_1sijkvt3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Verify Git Integration in Databricks&lt;/STRONG&gt;: Ensure that your GitHub account is properly linked to your Databricks account. You can do this by going to User Settings &amp;gt; Git Integration in Databricks and making sure your GitHub credentials are correctly set up. This step is crucial as the error message indicates missing Git provider credentials.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Use Databricks GitHub App&lt;/STRONG&gt;: Instead of using a Personal Access Token (PAT), consider using the Databricks GitHub App for integration. This app handles token renewal automatically and provides more granular control over access. You can install and configure the Databricks GitHub App by following the instructions in the Databricks documentation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Check Token Permissions&lt;/STRONG&gt;: Double-check the permissions of the GitHub Access Token you are using. Ensure it has the necessary scopes such as &lt;CODE&gt;repo&lt;/CODE&gt;, &lt;CODE&gt;admin:repo_hook&lt;/CODE&gt;, and any other relevant permissions required for updating the repository.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;STRONG&gt;Environment Variables in GitHub Actions&lt;/STRONG&gt;: Ensure that the environment variables in your GitHub Actions workflow are correctly set. The &lt;CODE&gt;DATABRICKS_HOST&lt;/CODE&gt;, &lt;CODE&gt;DATABRICKS_TOKEN&lt;/CODE&gt;, &lt;CODE&gt;REPO_ID&lt;/CODE&gt;, and &lt;CODE&gt;BRANCH&lt;/CODE&gt; should be correctly referenced from the GitHub secrets.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Mon, 04 Nov 2024 20:14:55 GMT</pubDate>
    <dc:creator>Walter_C</dc:creator>
    <dc:date>2024-11-04T20:14:55Z</dc:date>
    <item>
      <title>Updating databricks git repo from github action - how to</title>
      <link>https://community.databricks.com/t5/administration-architecture/updating-databricks-git-repo-from-github-action-how-to/m-p/96042#M2162</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;My company is migrating from azuredevops to github and we have a pipeline in azuredevops which updates/syncs databricks repos whenever a pull request is made to the development branch. The azure devops pipeline (which works) looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trigger:&lt;BR /&gt;- development&lt;/P&gt;&lt;P&gt;pool:&lt;BR /&gt;vmImage: ubuntu-latest&lt;/P&gt;&lt;P&gt;steps:&lt;BR /&gt;- task: AzureKeyVault@2&lt;BR /&gt;inputs:&lt;BR /&gt;azureSubscription: 'Azure Service Connection'&lt;BR /&gt;KeyVaultName: $(keyvault_name)&lt;BR /&gt;SecretsFilter: '*'&lt;BR /&gt;RunAsPreJob: true&lt;BR /&gt;- task: Bash@3&lt;BR /&gt;inputs:&lt;BR /&gt;targetType: 'inline'&lt;BR /&gt;script: |&lt;BR /&gt;echo "Setup Databricks environmental variables (to be able to autoconfig databricks-cli)"&lt;BR /&gt;export DATABRICKS_HOST=$(DATABRICKSHOST)&lt;BR /&gt;export DATABRICKS_TOKEN=$(DATABRICKSTOKEN)&lt;BR /&gt;echo ${#DATABRICKS_HOST}&lt;BR /&gt;echo Install Databricks CLI&lt;BR /&gt;pip install databricks-cli&lt;BR /&gt;echo Update Repo&lt;BR /&gt;databricks repos update --repo-id $(repo_id) --branch $(branch)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have rewritten it to fit a github action (i basically omitted fetching secrets from azure keyvault, and call them directly from the github secret env instead) like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name: Sync to Databricks Repo&lt;/P&gt;&lt;P&gt;on:&lt;BR /&gt;push:&lt;BR /&gt;branches:&lt;BR /&gt;- development&lt;BR /&gt;workflow_dispatch:&lt;/P&gt;&lt;P&gt;jobs:&lt;BR /&gt;sync-to-databricks:&lt;BR /&gt;runs-on: ubuntu-latest&lt;BR /&gt;&lt;BR /&gt;env:&lt;BR /&gt;DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}&lt;BR /&gt;DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}&lt;BR /&gt;&lt;BR /&gt;steps:&lt;BR /&gt;- name: Check out repository&lt;BR /&gt;uses: actions/checkout@v3&lt;/P&gt;&lt;P&gt;- name: Set up Python&lt;BR /&gt;uses: actions/setup-python@v4&lt;BR /&gt;with:&lt;BR /&gt;python-version: '3.x'&lt;/P&gt;&lt;P&gt;- name: Install and Configure Databricks CLI&lt;BR /&gt;run: |&lt;BR /&gt;echo "Setup Databricks environmental variables"&lt;BR /&gt;echo "Host length: ${#DATABRICKS_HOST}"&lt;BR /&gt;&lt;BR /&gt;echo "Installing Databricks CLI"&lt;BR /&gt;pip install databricks-cli&lt;BR /&gt;&lt;BR /&gt;echo "Updating Repo to development branch"&lt;BR /&gt;databricks repos update --repo-id ${{ secrets.REPO_ID }} --branch ${{ secrets.BRANCH }}&lt;BR /&gt;However, i run into authorization issues. The repo i try to update is in a Standard Databricks Workspace (not Premium). The git provider i use is "Github" and the connection i have set up to the github repository is via a Github Access Token with all relevant permissions (repo, admin, etc). The DATABRICKS_TOKEN i refer to is a Databricks Token i have created for my workspace admin user. I have 2xchecked all secrets, so i cant for the life of me not figure out why it goes wrong.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can run "databricks repos list" with the same credentials from the terminal without problems, but if i run&amp;nbsp;"databricks repos update 12345xxx --branch development" i receive "Error: Missing Git provider credentials. Go to User Settings &amp;gt; Git Integration to set up your Git credentials." even though i can pull etc. from the databricks repo UI with the same tokens. I get same error when i try to use the databricks API with curl.&lt;/P&gt;&lt;P&gt;Can anyone help me out here?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 18:38:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/updating-databricks-git-repo-from-github-action-how-to/m-p/96042#M2162</guid>
      <dc:creator>NielsMH</dc:creator>
      <dc:date>2024-10-24T18:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updating databricks git repo from github action - how to</title>
      <link>https://community.databricks.com/t5/administration-architecture/updating-databricks-git-repo-from-github-action-how-to/m-p/97612#M2233</link>
      <description>&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;It seems like the issue you're encountering is related to missing Git provider credentials when trying to update the Databricks repo via GitHub Actions. Based on the context provided, here are a few steps you can take to resolve this issue:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="_1sijkvt3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Verify Git Integration in Databricks&lt;/STRONG&gt;: Ensure that your GitHub account is properly linked to your Databricks account. You can do this by going to User Settings &amp;gt; Git Integration in Databricks and making sure your GitHub credentials are correctly set up. This step is crucial as the error message indicates missing Git provider credentials.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Use Databricks GitHub App&lt;/STRONG&gt;: Instead of using a Personal Access Token (PAT), consider using the Databricks GitHub App for integration. This app handles token renewal automatically and provides more granular control over access. You can install and configure the Databricks GitHub App by following the instructions in the Databricks documentation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Check Token Permissions&lt;/STRONG&gt;: Double-check the permissions of the GitHub Access Token you are using. Ensure it has the necessary scopes such as &lt;CODE&gt;repo&lt;/CODE&gt;, &lt;CODE&gt;admin:repo_hook&lt;/CODE&gt;, and any other relevant permissions required for updating the repository.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;STRONG&gt;Environment Variables in GitHub Actions&lt;/STRONG&gt;: Ensure that the environment variables in your GitHub Actions workflow are correctly set. The &lt;CODE&gt;DATABRICKS_HOST&lt;/CODE&gt;, &lt;CODE&gt;DATABRICKS_TOKEN&lt;/CODE&gt;, &lt;CODE&gt;REPO_ID&lt;/CODE&gt;, and &lt;CODE&gt;BRANCH&lt;/CODE&gt; should be correctly referenced from the GitHub secrets.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 04 Nov 2024 20:14:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/updating-databricks-git-repo-from-github-action-how-to/m-p/97612#M2233</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-11-04T20:14:55Z</dc:date>
    </item>
  </channel>
</rss>

