'Not Found' when trying to login with Netlify Identity

When I’m trying to login with Netlify Identity at https://jessicas-new-website.netlify.app/admin I get the popup ‘Not Found’ after authentication. In the console I get various error messages starting with 404 in trying to GET reach GitHub master.
The site is deployed from a private repo from an organization account.
The site is build with Hugo.
I have the same problem in Firefox, Chrome and Safari.
If I deploy the same site from a private repo in my personal GitHub account, this problem doesn’t occur.
I have tried

  • Registration ‘open’ and ‘invite only’,
  • with and without GitHub as external provider,
  • email invites with and without users having to verify their email address.

Build report:
12:07:20 PM: Build ready to start
12:07:21 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41
12:07:21 PM: build-image tag: v3.5.0
12:07:21 PM: buildbot version: df708c2c221a3345a3fb36b8609ebca30cb2f6c5
12:07:22 PM: Fetching cached dependencies
12:07:22 PM: Starting to download cache of 112.2MB
12:07:22 PM: Finished downloading cache in 615.697088ms
12:07:22 PM: Starting to extract cache
12:07:25 PM: Finished extracting cache in 2.725706942s
12:07:25 PM: Finished fetching cache in 3.373934613s
12:07:25 PM: Starting to prepare the repo for build
12:07:25 PM: Preparing Git Reference refs/heads/master
12:07:27 PM: Starting build script
12:07:27 PM: Installing dependencies
12:07:27 PM: Python version set to 2.7
12:07:28 PM: Started restoring cached node version
12:07:30 PM: Finished restoring cached node version
12:07:31 PM: v12.18.0 is already installed.
12:07:31 PM: Now using node v12.18.0 (npm v6.14.4)
12:07:31 PM: Started restoring cached build plugins
12:07:31 PM: Finished restoring cached build plugins
12:07:32 PM: Attempting ruby version 2.7.1, read from environment
12:07:33 PM: Using ruby version 2.7.1
12:07:33 PM: Using PHP version 5.6
12:07:33 PM: Installing Hugo 0.78.0
12:07:33 PM: Hugo Static Site Generator v0.78.0-FD62817B/extended linux/amd64 BuildDate: 2020-11-03T13:22:37Z
12:07:33 PM: Started restoring cached go cache
12:07:33 PM: Finished restoring cached go cache
12:07:33 PM: go version go1.14.4 linux/amd64
12:07:33 PM: go version go1.14.4 linux/amd64
12:07:33 PM: Installing missing commands
12:07:33 PM: Verify run directory
12:07:34 PM: ​
12:07:34 PM: ┌─────────────────────────────┐
12:07:34 PM: │ Netlify Build │
12:07:34 PM: └─────────────────────────────┘
12:07:34 PM: ​
12:07:34 PM: ❯ Version
12:07:34 PM: @netlify/build 5.2.1
12:07:34 PM: ​
12:07:34 PM: ❯ Flags
12:07:34 PM: deployId: 5fb25d6824607dba4e4a9187
12:07:34 PM: mode: buildbot
12:07:34 PM: ​
12:07:34 PM: ❯ Current directory
12:07:34 PM: /opt/build/repo
12:07:34 PM: ​
12:07:34 PM: ❯ Config file
12:07:34 PM: /opt/build/repo/netlify.toml
12:07:34 PM: ​
12:07:34 PM: ❯ Context
12:07:34 PM: production
12:07:34 PM: ​
12:07:34 PM: ┌────────────────────────────────────┐
12:07:34 PM: │ 1. build.command from netlify.toml │
12:07:34 PM: └────────────────────────────────────┘
12:07:34 PM: ​
12:07:34 PM: $ hugo
12:07:34 PM: Start building sites …
12:07:34 PM: | DE | EN
12:07:34 PM: -------------------±—±----
12:07:34 PM: Pages | 15 | 10
12:07:34 PM: Paginator pages | 0 | 0
12:07:34 PM: Non-page files | 0 | 0
12:07:34 PM: Static files | 84 | 84
12:07:34 PM: Processed images | 0 | 0
12:07:34 PM: Aliases | 2 | 1
12:07:34 PM: Sitemaps | 2 | 1
12:07:34 PM: Cleaned | 0 | 0
12:07:34 PM: Total in 228 ms
12:07:34 PM: ​
12:07:34 PM: (build.command completed in 281ms)
12:07:34 PM: ​
12:07:34 PM: ┌─────────────────────────────┐
12:07:34 PM: │ Netlify Build Complete │
12:07:34 PM: └─────────────────────────────┘
12:07:34 PM: ​
12:07:34 PM: (Netlify Build completed in 339ms)
12:07:34 PM: Caching artifacts
12:07:34 PM: Started saving build plugins
12:07:34 PM: Finished saving build plugins
12:07:34 PM: Started saving pip cache
12:07:35 PM: Finished saving pip cache
12:07:35 PM: Started saving emacs cask dependencies
12:07:35 PM: Finished saving emacs cask dependencies
12:07:35 PM: Started saving maven dependencies
12:07:35 PM: Finished saving maven dependencies
12:07:35 PM: Started saving boot dependencies
12:07:35 PM: Finished saving boot dependencies
12:07:35 PM: Started saving go dependencies
12:07:35 PM: Finished saving go dependencies
12:07:35 PM: Build script success
12:07:35 PM: Starting to deploy site from ‘public’
12:07:35 PM: Creating deploy tree
12:07:35 PM: Creating deploy upload records
12:07:35 PM: 0 new files to upload
12:07:35 PM: 0 new functions to upload
12:07:35 PM: Starting post processing
12:07:35 PM: Post processing - HTML
12:07:35 PM: Post processing - header rules
12:07:35 PM: Post processing - redirect rules
12:07:35 PM: Post processing done
12:07:35 PM: Site is live :sparkles:
12:07:48 PM: Finished processing build request in 26.75532321s

Hey there @Clemens_B! :wave:t2:

This issue looks the same as another that recently popped up:

But your additional error info is giving me a hunch. A question for you - is your repository’s primary branch named “master” or “main”? Based on the error coming from the Git Gateway and /branches/master in conjunction with GitHub changing the default primary branch name from ‘master’ to ‘main’, I’m wondering if Netlify CMS is just failing to find a ‘master’ branch

yes, my primary branch is named ‘master’.
(Also: just the deploy is working fine.)

Maybe a new clue: if I set the repository on Github to public (+ new API token + fresh deploy) I can access the admin UI without a problem. Unfortunately that is not an option for us.
(If I set it back to private (+ new API token + fresh deploy) the problem is right back).

I also copied my code and set it up in a new Github repo and deployed it via a new site on Netlify etc -> same problem.

It seems* that

  • disabling Git Gateway in the Netlify UI,
  • revoking Netlify Auth access in my personal Github account (not the one where the repo lies) and then
  • enabling Git Gateway in the Netlify UI again
    has solved the problem.

*seems: because the owner of the Github Account (where the repo lies) did the same and maybe that did the trick.

2 Likes

Now almost a year later, but I am having the same error. Context: I am a netlify newbie, but experienced web developer.

It’s not at all clear to me:
1.) How do I “Disable Git Gateway” in the netlify UI?
(i know how to revoke netlify from github, and went through that process (revoke/reauthorize.)

The other error as a new user is the reset password link is does not work “out of the box” from the Nuxt/Netlify example template. Need to modify the url with /admin before the token…

Any suggestions on how to troubleshoot this would be appreciated. I may just start with a clean template from scratch. But this has been a time sync…

Thanks in advance to anyone with suggestions on how to resolve this. :pray::grin:

Tom

p.s. might be relevant, my github repo is private, but netlify is granted access…

Hi. there, @TomV

Thanks so much for reaching out, and welcome to the Netlify Forums :netliconfetti: It looks like this thread was quiet since you first opened it, sorry about that!

I wanted to check in and see if you are still experiencing this issue? If you are, have you taken any additional troubleshooting steps during the past week? Let us know!