failed to push some refs to git@heroku.com

后端 未结 27 2186
野性不改
野性不改 2020-12-02 10:10

I am getting this error when I am trying push my files into heroku rep.

Ive set autocrlf = false already in gitconfig but this problem is still there. i have also tr

相关标签:
27条回答
  • 2020-12-02 10:30

    I was facing this issue while deploying a django app on heroku.

    In my case the requirements.txt, Procfile and runtime.txt files were present in a subdirectory. Moving them to the root directory of the repository solved the problem.

    Heroku is specifically looking for requirements.txt in the root directory to setup the python environment.


    P.S :

    If heroku is unable to reach till the wsgi file residing in the subdirectory, solve it by referring below thread -

    How can I modify Procfile to run Gunicorn process in a non-standard folder on Heroku?

    0 讨论(0)
  • 2020-12-02 10:33

    On my case clearing buildpacks worked heroku buildpacks:clear

    0 讨论(0)
  • 2020-12-02 10:33

    I had same problem, and I resolved it by doing this: heroku config:set DISABLE_COLLECTSTATIC=1 It was a django project on python 3.7

    0 讨论(0)
  • 2020-12-02 10:33

    Just switch the branch to main, It will surely work, and delete the project from Heroku remote. Delete all branches from local and use only one "main".

    For reference: https://help.heroku.com/O0EXQZTA/how-do-i-switch-branches-from-master-to-main

    0 讨论(0)
  • 2020-12-02 10:36

    I was getting this error because I added a line to my requirements.txt file that had an error:

    simplejson=2.6.2
    

    There was only one = and there should be two:

    simplejson==2.6.2
    

    Correcting this fixed the error.

    0 讨论(0)
  • 2020-12-02 10:37

    In my case, I had an invalid package name. I wasn't able to pick up on the error code right away, because I didn't scroll up far enough, but the error was:

    remote:        $ NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
    remote: npm ERR! code EINVALIDPACKAGENAME // <-- this was hard to find
    remote: npm ERR! Invalid package name "react-loader-spinne  r": name can only contain URL-friendly characters
    
    0 讨论(0)
提交回复
热议问题