通过代码管道从 Github 部署失败

Deployment Failed from Github via Code Pipeline

我正在尝试在我们的服务器上部署新东西。

每次都失败,我不知道为什么,每次我得到:

[Instance: i-0767cd899da6be838] Command failed on instance. 
Return code: 2 Output: (TRUNCATED)... see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - 
It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed. 
For more detail, check /var/log/eb-activity.log using console or EB CLI.

代码管道提出此消息:

Deployment completed, but with errors: 
During an aborted deployment, some instances may have deployed the new application version. 
To ensure all instances are running the same version, re-deploy the appropriate application version. 
Failed to deploy application. 
Unsuccessful command execution on instance id(s) 'i-0767cd899da6be838'. 
Aborting the operation. 
[Instance: i-0767cd899da6be838] Command failed on instance. 
Return code: 2 Output: (TRUNCATED)... see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. 
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed. 
For more detail, check /var/log/eb-activity.log using console or EB CLI.

我检查了弹性豆中的/var/log/eb-activity.log/var/log/httpd/error_log,但它们什么都没有。

这是composer.json可能有助于跟踪问题:

{
    "require": {
        "php": "7.2",
        "algolia/algoliasearch-client-php": "^3.1",
        "authy/php": "3.0.5",
        "barryvdh/laravel-cors": "^0.11.3",
        "barryvdh/laravel-translation-manager": "^0.5.3",
        "berkayk/onesignal-laravel": "^1.0",
        "cviebrock/eloquent-sluggable": "^4.6",
        "darkaonline/l5-swagger": "5.7.*",
        "doctrine/dbal": "2.10.1",
        "dusterio/laravel-aws-worker": "^0.1.26",
        "fideloper/proxy": "^4.0",
        "google/apiclient": "^2.4",
        "guzzlehttp/guzzle": "^6.3",
        "intervention/image": "^2.4",
        "jenssegers/agent": "^2.6",
        "laravel/framework": "5.7.*",
        "laravel/scout": "^7.0",
        "laravel/slack-notification-channel": "v1.0.3",
        "laravel/socialite": "^4.4",
        "laravel/tinker": "^1.0",
        "laravelcollective/html": "^5.7",
        "league/flysystem-aws-s3-v3": "^1.0",
        "maatwebsite/excel": "3.1.25",
        "pusher/pusher-php-server": "^4.1",
        "segmentio/analytics-php": "^1.7",
        "sentry/sentry-laravel": "1.6.1",
        "spatie/laravel-activitylog": "v2.8.4",
        "spatie/laravel-medialibrary": "^6.19.0"
    },
    "minimum-stability": "dev"
}

有什么帮助吗?

我的问题解决了。 起初我尝试在此 应用解决方案,但它并没有解决我的问题。

唯一解决我问题的方法是升级我的作曲家版本。

所以我通过以下方式将作曲家从 1.8.0 升级到 2.1.3

composer self-update 2.1.3

我必须在弹性 beantalk 配置文件中执行此操作:

commands:
  01updateComposer:
    command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update 2.1.3

希望有一天这对你们有所帮助。