由于超时/身份验证失败,Travis 构建随机出错 [英] Travis build getting Errored randomly due to timeout/authentication failure

查看:30
本文介绍了由于超时/身份验证失败,Travis 构建随机出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于连接超时、身份验证失败等问题,Travis 构建会随机失败.

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.

这是我的 composer.json,如果它可以提供任何线索.

Here is my composer.json, if it can give any clue.

推荐答案

该问题是由于 GitHub API 使用限制引起的.Travis 添加了自己的身份验证令牌,但如果要构建的项目很多,则很容易达到每小时 5000 个 API 请求的限制.

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.

解决此问题的一种方法是生成自己的只读 GitHub 令牌并使用它,这样您将获得自己每小时 5000 个 API 请求的限制,这应该足够了.

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"

这篇关于由于超时/身份验证失败,Travis 构建随机出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆