hamcrest / hamcrest-php

PHP Hamcrest implementation [Official]
Other
6.95k stars 44 forks source link

composer installation fails -> GitHub API limit (0 calls/hr) is exhausted #63

Closed ungefaehrlich closed 4 years ago

ungefaehrlich commented 4 years ago

Hi,

my CI Builds are failing in the moment because i could not download hamcrest via composer. Steps to reproduce:

  1. composer clearcache
  2. composer require hamcrest/hamcrest-php

It hangs waiting for token.

=> composer require  hamcrest/hamcrest-php
Using version ^2.0 for hamcrest/hamcrest-php
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (0%)GitHub API limit (0 calls/hr) is exhausted, could not fetch https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad. Create a GitHub OAuth token to go over the API rate limit. You can also wait until ? for the rate limit to reset.

Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+marcbox+2020-03-25+1556
to retrieve a token. It will be stored in "/home/marc/.config/composer/auth.json" for future use by Composer.
Token (hidden): 

Thanks for help : )

Cheers Marc

aik099 commented 4 years ago

The https://www.previousnext.com.au/blog/managing-composer-github-access-personal-access-tokens article explains in detail how to generate a token with much hight rate limit, then you're hitting.

Since this is not Hamcrest-specific issue I'm closing the ticket.