Deploy fails with 'Failed during stage 'preparing repo''

Suddenly, my site isn’t building and deploying from GitHub. Everything works fine locally and has always worked until recently. I had a build and deploy earlier this month (Sept 5) that worked great. Now, I have the following error. I’ve Retried with latest branch commit and also Cleared cache and retried with latest branch commit. The last commit was a very simple one so I’m clueless why I’m running into issues now.

My site is https://afreepodcast.com/ and the repo is here
GitHub - rmlumley/afreepodcast

10:23:22 AM: build-image version: ecdc8b770f4a0193fd3f258c1bc6029e681813a4 (focal)
10:23:22 AM: buildbot version: 5ff1f297aa225d2ec877d89104672fd74916351d
10:23:23 AM: Fetching cached dependencies
10:23:23 AM: Starting to download cache of 128.0MB
10:23:25 AM: Finished downloading cache in 2.015s
10:23:25 AM: Starting to extract cache
10:23:26 AM: Finished extracting cache in 1.779s
10:23:26 AM: Finished fetching cache in 3.833s
10:23:27 AM: Starting to prepare the repo for build
10:23:27 AM: User git error while checking for ref refs/heads/master
10:23:27 AM: Failing build: Failed to prepare repo
10:23:27 AM: Failed during stage 'preparing repo': For more information, visit https://docs.netlify.com/configure-builds/troubleshooting-tips/#build-fails-with-error-128: Warning: Permanently added 'github.com' (ECDSA) to the list of known hosts.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128

Hi @rmlumley,

Thanks for reaching out and welcome to Netlify’s Support forums!

From the log lines provided above, I see a exit status 128. Could you check section #8 in this support guide for tips on troubleshooting the exist status 128 issue:

Please let us know if you continue to have issues.

1 Like

Thank you. This did in fact work and I was part of the 99% that just needed to relink the repository.

1 Like