Git Gateway responses still indicate standard API rate limit after upgrading to GitHub Enterprise

Site name:

As a “quick fix” for a separate puzzling issue with Netlify CMS (where our GitHub API rate limit is suddenly getting exceeded constantly from thousands of potentially unnecessary requests), we have upgraded our GitHub organization to an Enterprise account to increase the hourly API request limit from 5,000 to 15,000. However, I haven’t seen the relevant response headers from Git Gateway update to reflect this change:

Screen Shot 2020-10-06 at 2.58.01 PM

We’re running the typical setup: the above request is made by Netlify CMS running at /admin on the deployed site, etc.

Things I have done so far:

  • Regenerated the GitHub API access token for the site’s Git Gateway
  • Cleared cache & redeployed the site
  • Made sure to have dev tools open with “Disable cache” checked before testing out the requests again (just in case)

Am I missing anything? Could it just be an expected delay with our GitHub account upgrade still processing? Hopefully this isn’t due to some nuanced misunderstanding on my part regarding how the rate limits apply to our account…

Any help here would be greatly appreciated. Thanks!

I’ve figured this out. Maybe the solution will help someone in the future…

Turns out the API rate limit increase for GitHub Enterprise does not go into effect for a regular personal access token, which is what gets generated by the button in Settings > Identity > Services > Git Gateway.

Instead of using “Generate access token in GitHub” in the UI to get a personal access token, I used an OAuth app token I generated manually by creating an OAuth app for our organization and going through the authorization flow outlined in GitHub’s docs. You can use a dummy page of some sort as the callback URL. Just make sure scope is set to repo on step 1 of the authorization or else you’ll get 404 responses when trying to use the token.

Seems like this approach isn’t specifically documented anywhere in Netlify’s docs, which I suppose is understandable considering our scenario probably isn’t too common.

Thanks so much for this great write-up :sparkles: