Home > Back-end >  Push rejected while deploying on heroku
Push rejected while deploying on heroku

Time:10-06

I am deploying my project with heroku. My Django version number is 3.2.8 and python 3.9.7. It is written on heroku. Heroku supports Python 3.9.7 deployment, but there is an error in my push process. The version above does not support it. What should I do? Thank you for your reply This is my cmd enter image description here my requirements.txt

enter image description here

CodePudding user response:

I haven't used Heroku but I'm curious if this is a problem related to enforced nomenclature on main branch.

A while back I could not push my first commit to a new and empty Git repository if my push command was "git push origin master", it started working after I changed it to "git push origin main" so I suspect this could be the issue you're facing.

Sorry I couldn't ask you before I posted this answer if this is your first push, I do not have enough points to post a comment.

CodePudding user response:

This is due to that Heroku has specific python runtimes.
Visit the link to know : Heroku Supported Runtimes Python

To solve this issue, simply create a runtime.txt file in root folder and add python-3.7.6

  • Related