
I recently start a blog using gatsby starter. The problem i'm facing right now is, whenever i post a blog via netlify CMS it shows Failed to persist entry: API_ERROR: Branch not found need help on this.
Is your repo part of an organization? In that case you might have to approve your app: https://help.github.com/en/articles/requesting-organization-approval-for-oauth-apps
I too have encountered this issue. I even re-did the gatsby tutorial, remade all repos and acces tokens, but it still throws this error.
I'll update if I find the solution.
I too was facing the same issue and currently facing but i tried to figure it out.
My website is hosted on Netlify so i went to the netlify initial url that is rahulism.netlify.app/admin and i have accessed it but when i go to rahulism.co/admin i face the same error. We'll this is just a small work, working for me.
I changed
backend:
name: github
repo: your-username/your-repo-name
to
backend:
name: git-gateway
branch: main
And it's working. Look at your repo branch and compare it to the branch in your config.yml.
In config.yml file, specify your main branch name (mainor masteror any other name) in the backend like below and it should work
backend:
name: github
repo: username/repo-name
branch: branch-name
Thanks MoHassn. My branch name is main, adding in that 'branch:main' fixed the problem. I did not have to switch the name from github to git-gateway.
branch: main
This solution worked for me. Adding branch fixed the issue.
Closing this issue resolved. Thanks everyone