git - 使用 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 应用程序。!推送失败
到目前为止我已经尝试过:
检查heroku以获取解释。我试过
heroku buildpacks:clear
然后heroku buildpacks:add --index heroku/python
然后我得到一个错误Error: Expected an integer but received: heroku/python.
git push --force heroku master
我明白了[remote rejected] master -> master (pre-receive hook declined)
解决方案
推荐阅读
- python - 为什么我的同一个 kivymd 应用程序说应用程序未安装?
- laravel - Laravel - 如何根据组织映射路线与登录用户
- api - 如果所有签名者都已完成签名,为什么 DocuSign 要求签署披露
- facebook - 用户评论脸书
- python - 破折号多个独立的回调
- python - 如何在python中从cmake运行可执行文件
- python - 将时间戳系列转换为分钟系列数据 || Python
- kubernetes - Helm 发布问题
- javascript - 引导导航栏下拉错误:index.js:60 Uncaught DOMException: Failed to execute 'querySelector' on 'Document'
- c - DO-While 嵌套循环