Skip to content

Support GitHub API Token #18

Closed
Closed

Description

@dflems

If you're on a shared network, you can sometimes see messages like this from the API:

$ curl https://api.github.com/repos/bazelbuild/bazel/releases
{
  "message": "API rate limit exceeded for 123.45.67.89. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
  "documentation_url": "https://developer.github.com/v3/#rate-limiting"
}

Homebrew (for instance) has support for supplying a token via HOMEBREW_GITHUB_API_TOKEN, making it more likely that the API request won't get rate limited. It would be nice for bazelisk to support this as well, perhaps via a similar convention (BAZELISK_GITHUB_API_TOKEN) to perform authenticated requests instead.

Activity

  1. dflems commented on Jan 2, 2019

    @dflems
    Author

    Ah I just noticed bazelisk only pulls the releases list from github.com and nothing else. Maybe it would be easier to publish something like https://releases.bazel.build/latest-version.txt on your end and pull that down instead :)

  2. keith commented on May 20, 2019

    @keith
    Member

    @philwo any ideas on a solution for this? I could dedicate some time to this if we had a clear path

  3. philwo commented on May 21, 2019

    @philwo
    Member

    Both ideas sound good - using a GitHub token (if available) and storing that information on our own host. I can handle the latter part, but integrating it into our release pipeline will take some time.

    @keith do you want to look into using a GitHub token? Sounds like a good and quick fix for this. I'm not sure where people would usually store these tokens - environment variable? If that's the usual way, sure, why not. :)

  4. keith commented on May 29, 2019

    @keith
    Member

    I've submitted an attempt at this here #62

  5. added a commit that references this issue on Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions