Travis build getting Errored randomly due to timeout/authentication failure

爱⌒轻易说出口 提交于 2019-12-14 02:35:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!