getting the error ! master -> master (pre-receive hook declined)
I get the following error (after the bundle install and assets precompile step that looks like had no problem)
- Heroku: Error pushing Rails app to Heroku, Heroku can't find Rails app
- Downgrade rails gem with Rubber
- Migrate Data and schema from development to production rails heroku
- Git workflow for a small team of developers and designers
- Capistrano 3 at deployment on Ubuntu 12.04 LTS gives error
- Error deploying to heroku
The error is the following:
remote: Verifying deploy............................ remote: remote: ! Push rejected to my-project. remote: To https://git.heroku.com/my-project.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/my-project.git'
An idea what can be causing this ? Is it in the heroku side or git side ? (I am using bitbucket)
2 Solutions collect form web for “getting the error ! master -> master (pre-receive hook declined)”
I faced a similar issue while deploying to heroku. The most probable cause is that there is an error in you source code. Scroll up the transcript generated(from which you have copied the mentioned message)
I found: “
remote: rake aborted! remote: NameError: undefined local variable or method `heroRails' for main:Object"
because of a typing error.
After correcting the source code commit and push.
‘git push heroku master’ will run and deploy succesfully.
As the error message suggests (
pre-receive hook declined), the server you are pushing to has a pre-receive hook, i.e. a script that is ran before the push is completed to check some well-formedness properties. Your code does not satisfy these.
Search “heroku pre-receive hook” on SO or your favorite search engine to find issues that may cause this.