<?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: HTTP 403 on git-credentials API in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15433#M9764</link>
    <description>&lt;P&gt;Hi @Sébastien FALQUIER​&amp;nbsp;it works for me, there are no restrictions. Maybe the PAT token you generated for the service principle got expired. Can you generate a new token and try to run GET/git-credentials API?&lt;/P&gt;&lt;P&gt;How are you creating PAT for service principle? If you use api/2.0/token-management/on-behalf-of/tokens make sure to set lifetime_seconds to a longer duration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark this comment as "best answer" if this resolves your query.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 15:48:45 GMT</pubDate>
    <dc:creator>Vivian_Wilfred</dc:creator>
    <dc:date>2022-12-21T15:48:45Z</dc:date>
    <item>
      <title>HTTP 403 on git-credentials API</title>
      <link>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15430#M9761</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to set git credentials for my service principal. I follow the process described &lt;A href="https://docs.databricks.com/dev-tools/ci-cd/ci-cd-sp.html#add-git-provider-credentials-to-a-databricks-workspace" alt="https://docs.databricks.com/dev-tools/ci-cd/ci-cd-sp.html#add-git-provider-credentials-to-a-databricks-workspace" target="_blank"&gt;here&lt;/A&gt; but I get a 403 error when making the POST request to &lt;B&gt;${&lt;/B&gt;DATABRICKS_HOST&lt;B&gt;}&lt;/B&gt;/api/2.0/git-credentials with service principal token.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I also cannot access this API with my PAT (see below) and get the same 403 Invalid access token error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any restriction on git-credentials API ? How to make it work ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sébastien&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;curl -X GET ${DATABRICKS_HOST}/api/2.0/git-credentials --header 'Authorization: Bearer ${DATABRICKS_TOKEN}'
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8"/&amp;gt;
&amp;lt;title&amp;gt;Error 403 Invalid access token.&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;HTTP ERROR 403&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;Problem accessing /api/2.0/git-credentials. Reason:
&amp;lt;pre&amp;gt;    Invalid access token.&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 10:29:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15430#M9761</guid>
      <dc:creator>sfalquier</dc:creator>
      <dc:date>2022-12-21T10:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP 403 on git-credentials API</title>
      <link>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15431#M9762</link>
      <description>&lt;P&gt;Hi @Sébastien FALQUIER​&amp;nbsp;please refer below link this might help you-&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html" alt="https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html" target="_blank"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/repos/git-version-control-legacy" alt="https://learn.microsoft.com/en-us/azure/databricks/repos/git-version-control-legacy" target="_blank"&gt;Link2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 11:59:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15431#M9762</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2022-12-21T11:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP 403 on git-credentials API</title>
      <link>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15432#M9763</link>
      <description>&lt;P&gt;Thanks for your help but my issue deals with &lt;A href="https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html" alt="https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html" target="_blank"&gt;git-credentials API&lt;/A&gt; authentication for a service principal. I do not have issue to connect and use git repositories from workspace webapp.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 13:00:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15432#M9763</guid>
      <dc:creator>sfalquier</dc:creator>
      <dc:date>2022-12-21T13:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP 403 on git-credentials API</title>
      <link>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15433#M9764</link>
      <description>&lt;P&gt;Hi @Sébastien FALQUIER​&amp;nbsp;it works for me, there are no restrictions. Maybe the PAT token you generated for the service principle got expired. Can you generate a new token and try to run GET/git-credentials API?&lt;/P&gt;&lt;P&gt;How are you creating PAT for service principle? If you use api/2.0/token-management/on-behalf-of/tokens make sure to set lifetime_seconds to a longer duration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark this comment as "best answer" if this resolves your query.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:48:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/http-403-on-git-credentials-api/m-p/15433#M9764</guid>
      <dc:creator>Vivian_Wilfred</dc:creator>
      <dc:date>2022-12-21T15:48:45Z</dc:date>
    </item>
  </channel>
</rss>

