Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 4

How to read a file in GitHub repo at very high QPS via REST API?

We are trying to leverage the GetContents GitHub API to read a file served in our GH repo. While it is working perfectly on our public repo, we encountered some issues with our private repo, on which we enabled basic auth and 2FA.

 

One of the requirement is that we want users without GH account to be able to access the private repo and read the file as well, so is this something feasible with GitHub API?

 

Additionally, even for users with GH account, since we enabled 2FA, an access code is required every time they login. Since the access code of 2FA expires very soon and it is received from users’ cell phone, is there a fully automated way to do so with GitHub API?

 

At Last,  according to API Rate Limit, the GitHub API rate limit is 60/HR per IP for unauthenticated call and 5000/HR per user for authenticated call. Since we are having large amount of requests, I am wondering if there is a way to customize this limit, or, any other approach to bypass the throttling?

 

Our current approach is to use web hosting, so that it would resolve all of these issues above-mentioned, but I am still wondering there is any other alternative?

3 Replies
Copilot Lvl 2
Message 2 of 4

Re: How to read a file in GitHub repo at very high QPS via REST API?

GitHub is not a CDN. There are plenty of better methods to deliver protected files.
Copilot Lvl 2
Message 3 of 4

Re: How to read a file in GitHub repo at very high QPS via REST API?

Could you possibly provide with some examples? Thanks!

Copilot Lvl 2
Message 4 of 4

Re: How to read a file in GitHub repo at very high QPS via REST API?

Store the file on S3 with private ACL. When a user authenticates with you and requests the file, use your AWS keys to sign a redirect response to the file.