Git Gateway error

Same issue here after changing my github repo name. Sounds like other people’s issues have been resolved by just waiting.

Getting a 401 unauthorized response. Hopefully, this issue resolves itself within the next few minutes.

1 Like

Hi @whipplepoint, thank for sharing your config.yml. By setting the backend to GitHub you’re actually not using git-gateway anymore, which is one way to solve this issue.
@bloxy, since you changed your repo name you might need to disable/enable git-gateway from Netlify’s site settings or even re-link the repo under build settings.

1 Like

Removing all cookies and refreshing the page worked for me

Might not be the real solution, but it should at least give a valid error response instead of Git Gateway Error: [object Object]


I am having a similar issue here. I setup an account on Netlify using an email instead of a github account.

When setting up the site I pointed it to my github repo. Even though I used a different email than the one I use for github.

After I setup my config file like so:

  name: git-gateway
  repo: byebyers/clearingkarmas
  branch: master

And was able to turn on identity and set up git-gateway like so

When creating an access token I was able to log into my github account so I figured that it would work. Still I am getting the same error.

Git Gateway Error: Please ask your site administrator to reissue the Git Gateway token.

I have tried creating a new one several times, cleared cache, reset the browser, and reset my pc but no luck.

Does my netlify email have to match my github one in order for this to work or am I missing something here?

I’m having the same problems and I cannot find a solution for this

@nogueira @byebyers I’m not sure if both of you have tried this but it was able to fix my issue!

Try switching your branch in config.yml from master to main. I initially had mine set to master, but then I noticed that my “Deploy contexts” section on Netlify showed my production branch as main.

Changing my yml branch to main worked! I also regenerated the key after changing the branch.


Thank you so much it worked!

Thanks for the help @ansh

1 Like

Hey @ansh,
Thanks so much for sharing this solution!

1 Like

Of course! This forum has been super helpful to me so I’m glad to help where I can :slight_smile:


This worked for me :raised_hands: Thanks @ansh!!!

Thanks, @ansh. :hugs: I just fixed mine now with your help

thank you for saying so! Please come back again soon :slight_smile:

This was the fix for me <3

This happened to me too after renaming my repo. After multiple token reissues, cache deletion, refreshes etc the solution that worked was to unlink the repo from Netlify and then relink it.


i got the same [object object] error - removed all cookies and voila it works again

I had the same problem when migrating a site to another branch in another repo. After having linked the new repo, I needed to change also the branch attribute under cms in config/_default/params.yaml

1 Like

Thanks for coming back and letting us know, @aretor :netliconfetti:

Git Gateway Error: [object Object]

I had this error after migrating via CDN from netlify-cms v1 to v2 on my gatsby site and then deploying the site on the master branch. It showed up right away on the /admin page.

Opening a window in incognito resolved it for me. A pain, but shows that there was no changes to make on my deploy.

Back to the original browser, I just cleared my storage and it worked. (I think it was just Cookies)

1 Like

Okay guys, so this is info for those who are struggling with it in 2022.

Here is a list of how to:

  1. DO NOT be pissed off like me, be better than me, it does not matter that you used TEMPLATE prepared by Netlify, they have not automated its testing, so keep patience and read next:
  2. If you have free tier JUST LIKE MANY OF US, do not follow this awesome post [Common Issue] Netlify CMS & Git Gateway - Email not confirmed because IT DOES NOT HELP
  3. Go to ./site/static/admin/config.yml (exactly this path, not something else)
  4. Add the branch field to config:
  name: git-gateway
  branch: main # <------ THIS
  1. Deploy website (push the changes) & wait until it finishes
  2. Go to /settings/identity#git-gateway in Netlify admin
  3. Disable & enable git-gateway
  4. Go to website /admin (NOBODY wrote it in README, so you must suffer, but whatever)
  5. Clear website data (or manually go to localStorage and cookies and remove ALL)
  6. Hard reload the page

Should work.
If it did not work, just leave the Netlify CMS, because they do not care about you, just like this Support Engineer answerd:

If you’ve indeed tried everything, I don’t think there’s anything more anyone can suggest.

You know…

Why am I using this straightforward language, because guys if you do something, please test it first, because people use it straight by your documentation and struggle sooooo much and spend sooooo much time and then we see this:

If you’ve indeed tried everything, I don’t think there’s anything more anyone can suggest.


Hi @alexblbl,

I understand it may have been frustrating finding the solution, but thank you for posting the solution in this thread.

The post you quoted is from over a year old ago and not all solutions may still be valid as the CMS changes over time. I believe in that post it was being asked if they had tried everything. Additionally, the person also posted a link to a similar Git Gitway issue on the netlify-cms’ Github repo, and they continued to try and help within the thread.

Note that Netlify CMS is an open source project and we do not offer the same level of support for Netlify CMS as we do for our core Netlify features. This is mentioned here. Netlify CMS is used by thousands of users and the community does our best to assist everyone as demonstrated many times in this thread and others. Other ways to get support for Netlify CMS are listed here: Community | Netlify CMS | Open-Source Content Management System.

1 Like