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

You have triggered an abuse detection mechanism. Please wait a few minutes before you try again. #487

Closed
mahnunchik opened this issue Nov 3, 2017 · 9 comments

Comments

@mahnunchik
Copy link

The following code:

const gh = new GitHub({
  token: 'PERSONAL TOKEN',
});

gh.search({ q: 'foobar' }).forCode()
  .then(res => {
    console.log(res.data)
  })
  .catch(console.error)

produces error 403: You have triggered an abuse detection mechanism. Please wait a few minutes before you try again.

@clayreimann
Copy link
Member

It sounds like you've hit a rate limit. Can you check the rate limit

@mahnunchik
Copy link
Author

Hi @clayreimann It happens after the first or second launch.

Limit is about 5K requests per hours.

@clayreimann
Copy link
Member

That sounds correct. I'm not sure what you're looking for in this issue. We are not affiliated with GH Inc and cannot change your rate limit.

You could parallelize your task with multiple personal tokens if you must exceed 5k requests/hour.

@mahnunchik
Copy link
Author

First search by foobar query hits the You have triggered an abuse detection mechanism. Please wait a few minutes before you try again. error. I did not reach 5k limit. Actually it performs about 10-20 requests before that error.

If I understand correctly I should be able to specify delay between pages or something similar.

@Interfish
Copy link

Hi, don't know if you already got an answer for that. Check this issue: issue. In summary, github search has a standalone rate limit other than github api rate limit

@skeptycal
Copy link

Homebrew suggests a fix:

I got this error today when trying to upgrade the homebrew python version to python 3.7.4 using homebrew (image below). I was actually doing a homebrew search python just to see what was available.

They suggest a fix, at least for homebrew, of clearing my macos keychain and resetting the github token as shown below.

Notes:

The fix seems to have worked.

  • I suspect my keychain entry was strange in some way since I was messing with it to get the Travis CLI to work yesterday.
  • I am not sure what triggered the 'abuse detection' since I was not accessing github any more than usual (read not much at all), so ymmv.
  • I do not remember homebrew needing access to my public repos and gists in the past, but it doesn't bother me at this point sharing within the requested scope.

Suggested Fix:

create a personal access token:
https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew

echo 'export HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> ~/.bash_profile

image

@j-rewerts
Copy link
Member

@skeptycal Thanks for the work around!

Closing, as this issue seems related to GitHub.

@skeptycal
Copy link

Sounds good.

@XiuyeXYE
Copy link

Mark,faced this before.

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

No branches or pull requests

6 participants