Dokku was giving me this error when I tried pushing my app to it:
[remote rejected] master -> master (pre-receive hook declined)
The error message is very vague and unhelpful. You can get more information by ssh-ing into your dokku instance and enabling tracing by running
dokku trace on. You will then get more detailed output when you try pushing and from that you should be able to tell what exactly went wrong. In my case, my app repository included a git submodule that the dokku server did not have permission to clone.