[Common Issue] "does not exist or you do not have permission" with failing builds

answered
#1

When you see the following error, it can point to your repository not being set up to allow us to pull your source code:

git ref refs/heads/master does not exist or you do not have permission

There are a couple of possible causes: one reason would be if someone has removed the deploy key from your repository, which we require to fetch your source code to build. Another possibility would be your repository at your git provider had become un-linked from our service.

The easiest way to repair is to:

  • start on the ‘build and deploy settings’ page, near the top where the repository information is
  • choose “edit settings”
  • then click on “link to a different repository”

Even if it is the same repository, this should fix the linkage and allow automatic deploys to work again.

That usually fixes most cases but if not, please let Support know at support@netlify.com.