首页 > 解决方案 > 使用 Git 部署时 Heroku 中的错误 H14

问题描述

一点背景知识:我正在部署一个使用 Python 和 Flask 构建的 Web 应用程序。我有一个 PostgreSQL 数据库。这是我在 Heroku 上部署的第一个项目 - 感谢您的耐心等待。我正在使用 Mac。我已经准备好 Procfile、requirements.txt、runtime.txt 和 gunicorn。该网络应用程序运行良好,这只是我卡在的最后一个阶段(部署)。

问题是当git push heroku master我收到Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref.当我这样做时,我得到 H14 错误heroku logs -t

我的构建日志指出:

检测到 Python 应用程序!请求的运行时 (python-3.7.6 gunicorn) 不适用于此堆栈 (heroku-18)。!中止。更多信息:https ://devcenter.heroku.com/articles/python-support !推送被拒绝,无法编译 Python 应用程序。!推送失败

到目前为止我已经尝试过:

标签: githeroku

解决方案


推荐阅读