Deploy fails with "failed during stage 'preparing repo': exit status 1"

:wave: First time poster here.

I have a personal site built using 11ty using automatic deployment from GitHub. Everything’s been working fine for weeks.

However I’ve been updating some images on my site in a branch+pull request. The site builds successfully locally and displays properly in a local browser. However when I push the commits up to my GH branch and Netlify builds them, I get the following error:

8:09:32 PM: Build ready to start
8:09:34 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
8:09:34 PM: build-image tag: v3.3.7
8:09:34 PM: buildbot version: 134ec431c6a3ff76e87cc4dc34007fe13842272f
8:09:34 PM: Fetching cached dependencies
8:09:35 PM: Starting to download cache of 319.3MB
8:09:47 PM: Finished downloading cache in 12.548108165s
8:09:47 PM: Starting to extract cache
8:09:59 PM: Finished extracting cache in 11.857813179s
8:09:59 PM: Finished fetching cache in 24.558800316s
8:09:59 PM: Starting to prepare the repo for build
8:09:59 PM: Preparing Git Reference pull/107/head
8:10:01 PM: Failing build: Failed to prepare repo
8:10:01 PM: failed during stage 'preparing repo': exit status 1
8:10:01 PM: Finished processing build request in 27.067839529s

I’ve looked here and here but can’t seem to fix my issue.

The Github repo in question is open source, this is the pull request I’m having issues with. Everything was going fine until this commit.

Is there something I can try short of reverting the branch back to that commit?

Many thanks in advance!

hmm, that sounds frustrating. Can you try re-linking the app from github to netlify, please?

Thank you, that seemed to work.

Going forward, what is the best way to “re-link the app from GitHub to Netlify”? Is there a screenshot or help article you can point me to?

I didn’t see a way in /sites/sitename/settings/deploys to “un-link” or “re-link” a repo. Changing the deploy settings didn’t seem to fix the issue.

I ended up deleting the entire site in Netlify and recreating it. Would love to avoid doing that in the future.

hi there, sorry, i was being a bit imprecise with my wording.

you could log in to github and remove the authorization for netlify to access the repo, and then redo that step. This is a workaround, not an explanation - it’s not obvious as to why this happened here, unfortunately.