Git Gateway error

Please help. Trying to log in to the admin for my new site.

This is the error i am getting

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

Hi @PhilomenaMbura, do you mind trying to re-generate the git-gateway token under your Netlify site setting? Can you share the network traffic from the browser when the error occurs?

I have re-generated the token but it still does not work.
This is the new error after re-generating

Git Gateway Error: [object Object]

What do you mean share the network traffic?

Hi @PhilomenaMbura, sorry for not being clear enough. Most browsers supply developer tools with a network tab.
For example in Chrome it looks like this:

Can you look for errors there/share the content for requests+responses? Similar, there should be a console table that might expose relevant errors.

I’m not the original poster but I got the same problem of Git Gateway Error: [object Object]. Here’s a screenshot of the error I get on the console.

I already tried reissuing the token and redeploying the site after. Appreciate your help!

Hi @bunnydreams and welcome to the community. Can you share the response for that failed request?

I managed to solve the error. Sorry for the late one and thanks for the help!

I’m guessing I was getting that error because the name on my github repo was different from the one on netlify.

I hope that helps.

1 Like

Thanks for following up @PhilomenaMbura!

I’m having the same issue after renaming my Github repository. Before the rename Netlify CMS was working. Since then I can’t login. I’ve reset the linked repository under Build settings and then disabled/enabled the git-gateway under Identity settings. I’ve cleared cookies and local storage, but when I try to login I get

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

in a yellow notification box and I can see a 401 HTTP response from Github API from a request to https://api.github.com/repositories/<number>/branches/master
{message: "Bad credentials", documentation_url: "https://developer.github.com/v3"}

I’ve tried to reset the token a few times + clearing cookies/storage as well, but no combination of token reset or re-connecting Github repo is solving this.

Any recommendations how to solve @PhilomenaMbura or @erez ?

aaaaaand as soon as I post that, I refreshed my browser and I am logged in successfully. After about an hour of trying various token resetting and Github repo reconnecting did it let me log in - maybe cache invalidation?

Thanks for following up @scottserok and I’m glad it worked out.
I’ve seen similar issues where just disabling & enabling git-gateway will result in a 404 when trying to access it so it might be related (in that case it the issue is resolve just by waiting some time). We’re still investigating it with our backend team.

I am having a similar issue. My error is Git Gateway Error: [object Object] in a yellow box.
In Netlify I have tried reseting the Deploy Key in settings->Build & deploy

I have also tried Disable Git Gateway in settings->Identity

I have also cleared my cache, reloaded, as well as giving it time. Still no luck.

Any help is appreciated

I was using the static/admin/config.yml file automatically generated by the getting started buttons on netlifycms.org.

I am not sure why but this yaml file did not include repo under backend:

backend:
  name: github
  repo: your-username/your-repo-name

By adding that and making sure it exactly matched my username and repo name I was able to log in.

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.

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.