首页 > 解决方案 > 推送到heroku的问题,应用程序不兼容并且远程被拒绝

问题描述

所以我是heroku的新手,并试图将我的项目推入heroku。我一开始也遇到了类似的错误,然后我做了一个临时分支,我可以推送它然后打开它,但是我的项目并不确定,只是欢迎屏幕。然后,我尝试以正常方式进行操作,它告诉我不确定默认语言是什么,所以我登录 heroku 并确保构建包设置为 python,但现在我收到此错误并且它仍然没有推动。我在根目录中有我的 .git 文件夹,当我推送时,我在根目录中。我确保检查了 git status,它说我在我的临时分支上,不知道如何将它切换回 master,但是在我进行更改之前,它说没有什么可以提交,工作树干净。

 remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to shrouded-sands-60485.
remote: 
To https://git.heroku.com/shrouded-sands-60485.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/shrouded-sands-60485.git'

要求.txt

beautifulsoup4==4.8.2
dj-database-url==0.5.0
Django==2.2.3
django-bootstrap4==1.1.1
django-storages==1.9.1
djangorestframework==3.10.2
Markdown==3.1.1
pbr==5.4.5
Pillow==7.0.0
pygame==1.9.6
pytz==2019.1
six==1.14.0
soupsieve==2.0
sqlparse==0.3.0
stevedore==1.32.0
virtualenv==16.6.1
virtualenv-clone==0.5.4
virtualenvwrapper==4.8.4

**目录 **

  .
├── 11_env
│   ├── bin
│   ├── lib
│   └── pyvenv.cfg
├── dating_app
│   ├── __init__.py
│   ├── __pycache__
│   ├── admin.py
│   ├── apps.py
│   ├── chat.html
│   ├── forms.py
│   ├── media
│   ├── migrations
│   ├── models.py
│   ├── static
│   ├── tag.py
│   ├── templates
│   ├── templatetags
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── dating_project
│   ├── __init__.py
│   ├── __pycache__
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── db.sqlite3
└── manage.py

标签: pythongitheroku

解决方案


推荐阅读