这是一种可能由于GitHub API限制而导致的AWS CodeBuild失败的情况。为了解决这个问题,您可以尝试在AWS CodeBuild项目中使用个人访问令牌(PAT),而不是GitHub凭据,即:
以下是一个使用AWS CodeCommit的示例代码:
version: 0.2
phases:
install:
commands:
- echo Nothing to install...
pre_build:
commands:
- echo Preparing the build...
build:
commands:
- echo Building the project...
- mvn install
post_build:
commands:
- echo Build completed on date
请注意,该示例为Java项目。如果您使用的是其他语言,那么您需要更改“build”部分中的命令。
尝试以上解决方法,如果问题仍然存在,则需要对AWS Codebuild和GitHub API进行更深入的分析和故障排除。