问题
Travis builds are failing randomly due to problems like connection timeout, authentication failure etc.
Any idea why is it happening ? How it can be fixed?
Check this build, two of the jobs passed while other two failed. Here in this build , all the jobs failed.
Here is my composer.json, if it can give any clue.
回答1:
The problem is caused by limits on GitHub API usage. Travis adds own authentication token, but in case there are many projects building, the limit of 5000 API requests in hour is easily reached.
One way to fix that is to generate own read only GitHub token and use it, this way you will get your own limit of 5000 API requests per hour, what should be enough.
To change used token, use:
composer config --global github-oauth.github.com "$GITHUB_TOKEN"
来源:https://stackoverflow.com/questions/31163758/travis-build-getting-errored-randomly-due-to-timeout-authentication-failure