<?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: Can't create branch of public git repo in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/77500#M7680</link>
    <description>&lt;P&gt;It occurs to me that one valid solution to this problem is simply to fork the repo and work there.&amp;nbsp; Pretty standard approach, I guess, although not something I've ever been in the habit of doing.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2024 15:30:56 GMT</pubDate>
    <dc:creator>DavidKxx</dc:creator>
    <dc:date>2024-07-09T15:30:56Z</dc:date>
    <item>
      <title>Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/67691#M7674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have cloned a public git repo into my Databricks account.&amp;nbsp; It's a repo associated with an online training course.&amp;nbsp; I'd like to work through the notebooks, maybe make some changes and updates, etc., but I'd also like to keep a clean copy of it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My preferred strategy would be to do all my work on a new branch, keeping `master` unaltered.&amp;nbsp; However, Databricks refuses the branch create instruction, saying "&lt;SPAN&gt;Invalid Git provider credentials", which I infer is about my lacking credentials to write back to the public repo.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What strategy will work for my intention?&amp;nbsp; I had expected that since the clone is in my Databricks account, it shouldn't mind my creating a branch, even if I don't have credentials to ever push it back to the original source.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:28:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/67691#M7674</guid>
      <dc:creator>DavidKxx</dc:creator>
      <dc:date>2024-04-30T14:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/67758#M7675</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;A id="link_7" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.databricks.com/t5/user/viewprofilepage/user-id/94566" target="_self" aria-label="View Profile of DavidKxx"&gt;&lt;SPAN class=""&gt;DavidKxx&lt;/SPAN&gt;&lt;/A&gt;, &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can clone public remote repositories without Git credentials (a personal access token and a username). &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;To modify a public remote repository&lt;/STRONG&gt; or to clone or modify a private remote repository, &lt;STRONG&gt;you must have a Git provider username and PAT with&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Write&amp;nbsp;(or greater) permissions for the remote repository.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In github documentation, it is mentioned&amp;nbsp;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;You can only create a branch in a repository to which you have push access.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch" target="_blank"&gt;https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So, it is a restriction from github really. Hope this helps.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 00:05:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/67758#M7675</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2024-05-01T00:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/68258#M7676</link>
      <description>&lt;P&gt;I don't see how that addresses the issue.&amp;nbsp; The page you linked to seems to be talking about creating a branch&amp;nbsp;&lt;STRONG&gt;on github&lt;/STRONG&gt;, which is not what I'm trying to do.&amp;nbsp; I want to create a branch only in my local clone of the repo -- I don't care about ever being able to push it back to github.&lt;/P&gt;&lt;P&gt;Here's another view of the problem.&amp;nbsp; I opened a `git bash` window on my Windows computer and cloned the same repo to a new local repo, and jumped inside the repo with `cd`.&amp;nbsp; At this point, I find that creating a new branch from the command line works successfully, and thus the new branch exists and is checked out.&amp;nbsp; My lack of github credentials to push to the original repo is no obstacle to that.&lt;/P&gt;&lt;P&gt;But as noted in the original question, Databricks won't let me do that on the repo inside Databricks.&amp;nbsp; Does that mean that Databricks is doing some kind of invisible little push of creating a new branch, and that's when the lack of credentials causes the the branch create to fail?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 13:09:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/68258#M7676</guid>
      <dc:creator>DavidKxx</dc:creator>
      <dc:date>2024-05-06T13:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/70091#M7677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/94566"&gt;@DavidKxx&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I am not sure I really understand your issue. Can you please provide me the steps you are following to run into this issue so that I can repro it at my end.&lt;/P&gt;
&lt;P&gt;I referred to the doc, and it appears what you intend is possible. Just referencing the relevant doc on creating a branch -&amp;nbsp;&lt;A href="https://docs.databricks.com/en/repos/git-operations-with-repos.html#create-a-new-branch" target="_blank"&gt;https://docs.databricks.com/en/repos/git-operations-with-repos.html#create-a-new-branch&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 09:43:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/70091#M7677</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2024-05-21T09:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/70126#M7678</link>
      <description>&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Clone&amp;nbsp;&lt;A href="https://github.com/bradyneal/causal-book-code.git" target="_blank" rel="noopener"&gt;https://github.com/bradyneal/causal-book-code.git&lt;/A&gt;&amp;nbsp;into Databricks&lt;/LI&gt;&lt;LI&gt;Click into the cloned repo's git interface&lt;/LI&gt;&lt;LI&gt;Click "Create Branch" and enter a desired name for the new branch&lt;/LI&gt;&lt;LI&gt;At this point, an error message ensues:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidKxx_0-1716299868481.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7779i61248DADA6FA886D/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="DavidKxx_0-1716299868481.png" alt="DavidKxx_0-1716299868481.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;In summary, Databricks won't let me create a new branch in the local repo.&lt;/P&gt;&lt;P&gt;In contrast, as I noted in my last post, I can create a new branch in the local repo if I do it through the `git bash` command line, by the following sequence of commands:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;git clone https://github.com/bradyneal/causal-book-code.git
cd causal-book-code
cd git checkxxx -b test&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(but replace `xxx` with `out` --- I had to substitute `xxx` to avoid using a full word that this commenting interface forbids)&lt;/P&gt;&lt;P&gt;This results in a new branch `test` having been created and checked out in the local repo.&amp;nbsp; Therefore, it's generically possible to create a new branch locally in a repo to which I have no Github write permissions, and the fact that I can't do it in Databricks appears to be a Databricks issue or design choice.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:07:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/70126#M7678</guid>
      <dc:creator>DavidKxx</dc:creator>
      <dc:date>2024-05-21T14:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/70153#M7679</link>
      <description>&lt;P&gt;I get your issue,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/94566"&gt;@DavidKxx&lt;/a&gt;. Until we do a git push on command line we do not see the&amp;nbsp;&lt;SPAN&gt;Authentication failed&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;git push origin test&lt;/LI-CODE&gt;
&lt;P&gt;While in the Databricks UI, we fail early(screenshots below). We require the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="reference external" href="https://github.com/apps/databricks" target="_blank" rel="noopener"&gt;Databricks GitHub App&amp;nbsp;&lt;/A&gt;as mentioned &lt;A href="https://docs.databricks.com/en/repos/get-access-tokens-from-git-provider.html#link-github-account-using-databricks-github-app" target="_self"&gt;here&lt;/A&gt; to provide us access to the repository.&lt;/P&gt;
&lt;P&gt;By reading the doc on github&amp;nbsp;&lt;A href="https://docs.github.com/en/apps/using-github-apps/installing-a-github-app-from-github-marketplace-for-your-organizations#about-installing-github-apps" target="_self"&gt;apps&lt;/A&gt;&amp;nbsp;it appears, this is how "apps" work. They have set &lt;A href="https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps?apiVersion=2022-11-28" target="_self"&gt;permissions&lt;/A&gt; that are required.&lt;/P&gt;
&lt;P&gt;I looked at the error from the request, it is&amp;nbsp;PERMISSION_DENIED&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "data": {
        "projectsProjectGitCheckout": {
            "branch": null,
            "apiError": {
                "code": "PERMISSION_DENIED",
                "message": "Link to GitHub account does not have access. To fix this error:\n1. GitHub user bradyneal should go to https://github.com/apps/databricks/installations/new and install the app on the account (bradyneal) to allow access.\n2. If user bradyneal already installed the app and they are using scoped access with the 'Only select repositories' option, they should ensure they have included access to this repository by selecting it.\nRefer to https://docs.databricks.com/en/repos/get-access-tokens-from-git-provider.html#link-github-account-using-databricks-github-app for more information. If the problem persists, please file a support ticket.",
                "__typename": "ApiError"
            },
            "__typename": "ProjectsProjectGitCheckoutResponse"
        }
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-21 at 21.59.37.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7783iDDFE59424BDA2994/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-05-21 at 21.59.37.png" alt="Screenshot 2024-05-21 at 21.59.37.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-21 at 22.01.03.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7784i03BAA7B58364E3F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-05-21 at 22.01.03.png" alt="Screenshot 2024-05-21 at 22.01.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Kindly let me know if you think otherwise. Why it is working on cmd but not apps is another question to discuss as it may not be possible to implement the permissions check in command line - as branch is still local.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 17:12:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/70153#M7679</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2024-05-21T17:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create branch of public git repo</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/77500#M7680</link>
      <description>&lt;P&gt;It occurs to me that one valid solution to this problem is simply to fork the repo and work there.&amp;nbsp; Pretty standard approach, I guess, although not something I've ever been in the habit of doing.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 15:30:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-t-create-branch-of-public-git-repo/m-p/77500#M7680</guid>
      <dc:creator>DavidKxx</dc:creator>
      <dc:date>2024-07-09T15:30:56Z</dc:date>
    </item>
  </channel>
</rss>

