I have regenerated my github api keys from the netlify control panel at Netlify App multiple times and am still getting this error response when I click ‘Login with Netlify Identity’ from my CMS page:
GET: https://mysite.netlify.com/.netlify/git/github/branches/master?ts=1562846613232
404 Not Found
The response is from github’s api and seems to indicate that my branch was not found:
It might be worth noting that the github repo I am working with belongs to an Organization, of which I am a fully-privileged member and is private. It was not deployed using the one-click deploy. Rather it is a next.js site and was deployed following the instructions here: NextJS | Netlify CMS | Open-Source Content Management System
Again, I have tried multiple times with re-generating the github API keys to no avail, which leads me to suspect that this is a different issue.
Yes i can confirm my issue is the same as yours. A user Cannot sign into the CMS using the netlify github auth gateway if the repo is private and belongs to an org (of which the user is the owner, with full permissions). Furthermore i can confirm that the Netlify github App permissions within the github organization are correct read/write.
I have found a workaround by deploying from a private personal repo. In this case the CMS works fine, indicating that this is not a user error.
I suggest we move all discussion of this issue to your ticket where I will re-post this comment.