Fabric Git Says “Can’t fetch branches”: Check the Tenant Setting
Symptom
I tried to connect a Fabric workspace to a GitHub repository and the branch picker failed with “Can’t fetch branches”. The repository existed and I had access to it, so nothing about the message pointed at the real problem.
Cause
A tenant setting was off: “Users can sync workspace items with GitHub repositories”. My tenant was brand new, and I could not change tenant settings at all until I had taken over administration of it. That made the setting both disabled and out of reach, which is why I lost time on the repo side first.
Fix
- Get admin rights on the tenant. In my case that meant claiming the unmanaged tenant, which involved MFA and a DNS TXT record on the domain.
- In the admin tenant settings, enable “Users can sync workspace items with GitHub repositories”.
- Go back to the workspace and connect to the repository again.
How I Proved It
I did not capture a before-and-after screenshot of the error clearing, so treat the cause-and-effect as my working conclusion rather than a controlled test. What I can say is that the setting was off when I hit the error, I turned it on, and after that the workspace connected to a branch and synced a commit from the repository. That sync later carried the semantic model and the report into the workspace.
If you see this message on a tenant you did not set up yourself, ask whoever administers it to check that one setting before you touch tokens or repository permissions.