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

后端 未结 21 1646
我在风中等你
我在风中等你 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:12

    I was facing the same problem.

    [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to ""

    Cause of Error :
    I was in develop branch and trying to push to remote master branch

    Solution:
    Checkout to develop branch(another branch) and execute :

    git push heroku develop 
    
    0 讨论(0)
  • 2020-11-30 02:12

    I have just run the heroku logs command and checked the git status then retried the git push hreoku master and it worked

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

    I also faced the same issue The solution for this is

    Delete the package-lock.json file on both the client and server

    Make sure that you are using at least the LTS version of Node locally

    Make sure your local Node version matches what is shown in the package.json file's engines property.

    Run the git add . , git commit -m "fixing versions" and git push heroku master commands to force a rebuild.

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

    In Heroku, you may have problems with pushing to the master branch. What you can do is to start a new branch using

    git checkout -b tempbranch

    and then push using

    git push heroku tempbranch

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

    Mine finally worked somewhere along this road:

    1. Updating Git
    2. back to \my_first_rail_app\, type or run:
      • a. bundle install
      • b. bundle install --gemfile
      • c. bundle update
      • d. git add .
      • e. git commit -m "updates for heroku deployment"
      • f. git pust heroku master (still wont work with my case)
      • g. heroku buildpacks:set https://github.com/bundler/heroku-buildpack-bundler2
    0 讨论(0)
  • 2020-11-30 02:16

    You might also want to check for Heroku telling you there's a typo in your CSS file.

    Read through the long boring messages in the terminal closely after you push. There may be something like this: Invalid CSS after. It means Heroku has found a typo and you need to fix it in the CSS file.

    You can do a find for rake aborted! and directly after that it should say why the push failed.

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