Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid Github API rate limit #242

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

drizzd
Copy link
Contributor

@drizzd drizzd commented Mar 13, 2019

The Github API has a per-user rate limit. For anonymous users, which we
are, the limit counts per IP address. For large organizations this can
be an issue. Instead, make the latest version check against
gitforwindows.org.

We still make calls to the Github API when we decide that we should
download a new release. But this happens only once per user and Git
release.

Signed-off-by: Clemens Buchacher [email protected]
See also git-for-windows/git#1813.

@drizzd drizzd requested a review from dscho March 13, 2019 18:53
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a tiny nit, but I think it makes the code a bit conciser.

The Github API has a per-user rate limit. For anonymous users, which we
are, the limit counts per IP address. For large organizations this can
be an issue. Instead, make the latest version check against
gitforwindows.org.

We still make calls to the Github API when we decide that we should
download a new release. But this happens only once per user and Git
release.

Signed-off-by: Clemens Buchacher <[email protected]>
@drizzd drizzd force-pushed the avoid-github-rate-limit branch from 8c37b1e to 4fd27ef Compare March 13, 2019 19:08
@dscho dscho merged commit 4e5aa81 into git-for-windows:master Mar 13, 2019
@dscho
Copy link
Member

dscho commented Mar 13, 2019

Thanks!

dscho added a commit that referenced this pull request Mar 13, 2019
Git for Windows' updater [no longer runs into GitHub API rate
limits](#242)
(this used to be quite common in enterprise scenarios, where many
users would share one IP as far as GitHub is concerned).

Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants