我阅读了之前所有关于它的帖子,但仍然不能纠正它。我将requirements.txt和Procfile添加到由Heroku创建的计算机目录中。Procfile写着"web: python Chat Server.py“。还在读取“runtime.txt -3.6.2”.However的同一目录中添加了python,它总是在命令提示符下再次给出相同的错误。我该如何解决这个问题呢?这是完整的错误消息:
"C:\Users\asus\chat_server>git推送heroku主计数对象: 6,完成。使用最多4个线程的增量压缩。压缩对象: 100% (4/4),完成。写入对象: 100% (6/6),1.14 KiB | 585.00 KiB/s,完成。共6(增量1),重用0(增量0)远程:正在压缩源文件...好了。远程:构建源:远程:远程:->应用与构建包不兼容:https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz remote:更多信息:https://devcenter.heroku.com/articles/buildpacks#detection-failure remote: remote:!远程推送失败:正在验证部署...远程:远程:!推送被拒绝至沸腾流-15219。remote:到https://git.heroku.com/boiling-stream-15219.git!远程拒绝的主->主服务器(接收前钩子被拒绝)错误:无法将某些ref推送到'https://git.heroku.com/boiling-stream-15219.git‘“
发布于 2018-05-09 07:24:50
阅读这篇文章的人:你需要两个文件:
第一个文件:requirements.txt,其中包含类似:gunicorn==19.7.1或pip freeze > requirements.txt的任何结果。
第二个文件:包含类似web: gunicorn app:app或可能为空的内容的Procfile。请注意,本例中的app:app是对python文件名的引用。这意味着每次声明web进程并启动此类型的dyno时,还要运行命令gunicorn app:app来启动您的web服务器。
然后是git add .和git commit -m "added Procfile and requirements.txt"。
然后运行git push heroku master,从本地master分支推送到heroku remote。
发布于 2019-01-29 00:53:05
除了JaredH的回答之外,在运行git push heroku master之前,请确保您当前的分支是主分支。
https://stackoverflow.com/questions/48341454
复制相似问题