Site builds but says "Repository not found"


I have been successfully (as far as I know) building my site on my last few pushes to Github, but I just noticed the builds all show up as FAILED in my Netlify dashboard.

Looking at the output it seems to be a Github authentication issue, but nothing in my setup has changed that I am aware of, and indeed the builds at least superficially seem to have been successful. My repo is private, but this was true before also, when the builds weren’t showing any errors.

I read previous topics on similar issues but as far as I can tell they don’t apply to my case (I am not aware of any submodules.)

Below the relevant build output:

7:06:10 PM: Fetching cached dependencies

7:06:10 PM: Failed to fetch cache, continuing with build

7:06:10 PM: Starting to prepare the repo for build

7:06:10 PM: User git error while checking for ref refs/heads/production

7:06:10 PM: Failing build: Failed to prepare repo

7:06:10 PM: Failed during stage 'preparing repo': error checking for ref: Warning: Permanently added '' (RSA) to the list of known hosts.

ERROR: Repository not found.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

: exit status 128

hi there,

the error “preparing repo” definitely means that we are having trouble connecting to or cloning down your repository in order to deploy it -

this means we are not deploying this content. Is is possible that what you are seeing live is either an earlier version or is from a different repo, perhaps?

can you try doing a fresh, bare clone of your repo into a new directory and see if that works - we would want to make sure your repo isn’t corrupted in some way, first.

My apologies Perry – I just spent some time investigating this and was going absolutely crazy, but it looks like I had another Netlify account with some recent failed builds on it.

1 Like