Error fetching branch, possibly after configuring multiple sites from same repo

So today, my deploys started failing with this error message:

4:22:33 PM: Starting to prepare the repo for build
4:22:33 PM: Preparing Git Reference refs/heads/master
4:22:35 PM: Error fetching branch: refs/heads/master
4:22:35 PM: Failing build: Failed to prepare repo
4:22:35 PM: failed during stage 'preparing repo': exit status 1

Here’s an example:

Deploys have been working fine, so this is a new and unexpected issue. I tried to re-assign the repo, (triggering the GitHub permissions thing) but to no avail.

What I changed today is configure 4 additional sites from the same repo. Allow me to explain:

For weeks now, I’ve been publishing a site from this repo as
Today, I added 4 new sites:

My site is multilingual, and I want each site on its own subdomain. The language is controlled by a environment variable configured in each site’s settings.

The initial deploy for each of these went through, but ever since, all updates (on all these sites) throw this Error fetching branch error.

Now I don’t see an obvious reason why one would be related to the other, but since it’s the thing I changed right before things broke, I’m guessing it might cause an issue somewhere.

I’m a bit stumped here, so I’m open to any ideas on how to troubleshoot this.

It was a problem with a submodule. The commit that was refefenced wasn’t (yet) pushed to GitHub, and this not available.


I had the same error but in my case I changed a submodule URL. Clearing the netlify cache fixed it

1 Like