【问题标题】:How to fix long-running `git push` to Heroku remote responding `504 GATEWAY_TIMEOUT`?如何修复长期运行的“git push”到 Heroku 远程响应“504 GATEWAY_TIMEOUT”?
【发布时间】:2018-12-31 19:25:33
【问题描述】:

我正在尝试为 Heroku 上托管的 git repo 的分支执行 git push(强制)。

不幸的是,经过长时间的等待,这将超时。我已经尝试了很多次,同样的504 GATEWAY_TIMEOUT 错误:

$ git push --force my-heroku-remote my-feature-branch:master
Counting objects: 12345, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (12345/12345), done.
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 GATEWAY_TIMEOUT
fatal: The remote end hung up unexpectedly
Writing objects: 100% (12345/12345), 347.86 MiB | 98.00 KiB/s, done.
Total 12345 (delta 123), reused 1234 (delta 123)
fatal: The remote end hung up unexpectedly
Everything up-to-date

如何才能成功推送到这个遥控器?

【问题讨论】:

    标签: git heroku deployment heroku-cli


    【解决方案1】:

    Heroku 支持建议重置成功解决问题的远程仓库。 在运行此命令之前,请绝对确定您在正确的 heroku 应用程序/repo 上执行此操作:

    heroku repo:reset -a my-heroku-app
    

    运行上述命令后,git push 正常运行。

    这使用 Heroku CLI repo 插件,您可能需要安装它:https://github.com/heroku/heroku-repo#reset

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-23
      • 2011-12-19
      • 2016-11-17
      • 1970-01-01
      • 1970-01-01
      • 2013-02-28
      • 2016-10-07
      • 2013-01-27
      相关资源
      最近更新 更多