Elastic Beanstalk git aws.push 问题

Posted

技术标签:

【中文标题】Elastic Beanstalk git aws.push 问题【英文标题】:Elastic Beanstalk git aws.push issues 【发布时间】:2015-01-19 03:39:12 【问题描述】:

在使用 AWS-ElasticBeanstalk-CLI-2.6.0(需要 Ruby 的版本)时,我在 git aws.push 上开始出现以下错误:

MacBook-Pro:apps-prd katia$ git aws.push
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (18/18), 126.20 KiB | 0 bytes/s, done.
Total 18 (delta 10), reused 4 (delta 1)
error: RPC failed; result=22, HTTP code = 400
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

我遇到了this solution,它建议获取最新版本的 EB 命令行工具并重置所有引用它的位置。

在获得最近的 ASW CLI (2.6.4) 并重新配置后,我在 git aws.push 上收到此消息:

MacBook-Pro:apps-prd katia$ git aws.push
Updating the AWS Elastic Beanstalk environment eb-prescoapps-php-env...
Environment update initiated successfully.

但是,每次提交后部署我的应用程序大约需要 20-30 分钟(第 2 行和第 3 行之间的长姿势),而之前根据提交需要 1-3 分钟。

这是标准行为吗?是否部署了整个应用程序而不仅仅是提交的更改?有没有办法修复它?

【问题讨论】:

【参考方案1】:

我刚刚更新了 EB CLI 2.6.4,现在它可以工作了。比以前的版本慢了一点,但不超过2分钟。

人, 如果您不想在升级到 2.6.4 后执行 eb init,则只能使用以下内容更新 .git/config 文件

[alias "aws.elasticbeanstalk"]
    remote = !.git/AWSDevTools/aws.elasticbeanstalk.push --remote-url
    push = !.git/AWSDevTools/aws.elasticbeanstalk.push
    config = !.git/AWSDevTools/aws.elasticbeanstalk.config
    createapplicationversion = !.git/AWSDevTools/aws.elasticbeanstalk.createapplicationversion
[aws "endpoint"]
    us-east-1 = git.elasticbeanstalk.us-east-1.amazonaws.com
    ap-northeast-1 = git.elasticbeanstalk.ap-northeast-1.amazonaws.com
    eu-west-1 = git.elasticbeanstalk.eu-west-1.amazonaws.com
    us-west-1 = git.elasticbeanstalk.us-west-1.amazonaws.com
    us-west-2 = git.elasticbeanstalk.us-west-2.amazonaws.com
    ap-southeast-1 = git.elasticbeanstalk.ap-southeast-1.amazonaws.com
    ap-southeast-2 = git.elasticbeanstalk.ap-southeast-2.amazonaws.com
    sa-east-1 = git.elasticbeanstalk.sa-east-1.amazonaws.com
[alias "aws"]
    push = !git aws.elasticbeanstalk.push
    config = !git aws.elasticbeanstalk.config
    createapplicationversion = !git aws.elasticbeanstalk.createapplicationversion

也许 AWS Support 可以确认上述内容。

问候,

【讨论】:

【参考方案2】:

如果您仍有问题,我强烈建议您升级到EB CLI 3.x。它修复了之前版本存在的许多问题,并且是更好的体验。

您可以通过以下方式查看您正在运行的版本:

eb --version

【讨论】:

以上是关于Elastic Beanstalk git aws.push 问题的主要内容,如果未能解决你的问题,请参考以下文章

Elastic Beanstalk git aws.push 问题

如何将 git 子模块推送到 AWS Elastic Beanstalk?

AWS Elastic Beanstalk 上的 Git 文件夹

Elastic Beanstalk “git aws.push” 只承诺区别?

Rails - AWS(Elastic Beanstalk)部署,错误命令“git clone”

git aws.push 将新的 php 应用程序上传到 Elastic Beanstalk