remote rejected master -> master (pre-receive hook declined)

后端 未结 21 1647
我在风中等你
我在风中等你 2020-11-30 01:31

I\'m working in rails 3.2 and I receive an error when I try to push to heroku:

 git push heroku master
Counting objects: 496, done.
Delta compression using u         


        
相关标签:
21条回答
  • 2020-11-30 02:25

    just in case you have this problem while trying to push a django app to heroku and then you get this error:

    ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to https://git.heroku.com/app_name.git

    simply look for this :

    Error while running '$ python manage.py collectstatic --noinput'. remote: See traceback above for details. remote: remote: You may need to update the application code to resolve this error. remote: Or, you can disable collectstatic for this application: remote: remote: $ Heroku config:set DISABLE_COLLECTSTATIC=1

    Copy this : $ Heroku config:set DISABLE_COLLECTSTATIC=1

    and paste it in the terminal. Press Enter and after that run: $ git push Heroku master

    This should solve your problem if Django app is what you are trying to push.

    0 讨论(0)
  • 2020-11-30 02:25

    I was getting the same error, and running the following code in the command line solved it:

    $ heroku config:set BUNDLE_WITHOUT="development:test"
    
    0 讨论(0)
  • 2020-11-30 02:26

    For completeness, the issue may be heroku itself. In rare cases like these https://status.heroku.com would show something along the lines of:

    Update

    The Heroku Dashboard and Elements have been restored. We are still working to restore the other affected services.

    The services still affected are:

    • Builds
    • Review apps
    • Pipelines
    • Github deploys
    • Heroku CI
    • Heroku Buttons

    I was able to deploy about 40 minutes later after heroku reported:

    All affected services have been restored and are now working as expected. We will be monitoring to ensure there are no further issues.

    0 讨论(0)
提交回复
热议问题