我正在尝试将我的 repo 推送到我的 heroku 堆栈,但每次都会出现此错误:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-heroku-project.git'
这是 Python 3.8.0 版的完整命令行日志:
Enumerating objects: 36, done.
Counting objects: 100% (36/36), done.
Delta compression using up to 8 threads
Compressing objects: 100% (27/27), done.
Writing objects: 100% (36/36), 4.63 MiB | 923.00 KiB/s, done.
Total 36 (delta 9), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: /app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/bin/steps/python: line 5: warning: command substitution: ignored null byte in input
remote: ! Requested runtime (ÿþPython-3.8.0) is not available for this stack (heroku-18).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to my-heroku-project.
remote:
To https://git.heroku.com/whatsapp-vertretungsplan-bot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-heroku-project.git'
这是 Python 3.7.5 版的完整命令行日志:
Enumerating objects: 40, done.
Counting objects: 100% (40/40), done.
Delta compression using up to 8 threads
Compressing objects: 100% (30/30), done.
Writing objects: 100% (40/40), 4.63 MiB | 910.00 KiB/s, done.
Total 40 (delta 11), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: /app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/bin/steps/python: line 5: warning: command substitution: ignored null byte in input
remote: ! Requested runtime (ÿþPython-3.7.5) is not available for this stack (heroku-18).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to my-heroku-project.
remote:
To https://git.heroku.com/whatsapp-vertretungsplan-bot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-heroku-project.git'
(这是我第一次使用 Git 和 Heroku。所以如果错误很明显,我很抱歉。)
最佳答案
python在runtime.txt文件中是怎么写的? python 还是 python ?这个问题发生在我身上:我从 Python-3.8.0 更改为 python-3.8.0 并且它有效。
关于python - Git Heroku 错误 [远程拒绝] ...(预接收 Hook 被拒绝),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58883920/