git, Heroku: pre-receive hook declined

ghz 1years ago ⋅ 2172 views

Question

I am in the process of setting up a git repository and attempting to link it to Heroku. When I run the command

git push heroku master

I receive

Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 714 bytes, done.
Total 7 (delta 1), reused 0 (delta 0)

-----> Heroku receiving push

 !     Heroku push rejected due to an unrecognized error.
 !     We've been notified, see http://support.heroku.com if the problem persists.


To [[email protected]](/cdn-cgi/l/email-protection):morning-stream-3712.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[[email protected]](/cdn-cgi/l/email-protection):morning-stream-3712.git'

How can I get my application pushed to Heroku?


Answer

Make sure you are pushing a repo that contains a proper supported app ( Rails, Django etc.) and you are not just pushing some random repo to test it out.

[Newbie in Heroku: Error when push my app to Heroku](https://stackoverflow.com/questions/8165028/newbie-in-heroku-error- when-push-my-app-to-heroku/8171155#8171155)

If that is not the case and you are pushing what you think is a valid app, contact Heroku support and they will fix it for you.