Dokku Remote Rejected (pre-receive hook declined) MEAN (yo

April 5, 2015 6.3k views
Node.js Dokku MEAN DigitalOcean

When I attempt to push to my Dokku droplet, I get this error:

git push dokku master
Counting objects: 965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (945/945), done.
Writing objects: 100% (965/965), 242.54 KiB | 0 bytes/s, done.
Total 965 (delta 668), reused 0 (delta 0)
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ''

I’m not sure what to do now, since there isn’t a log of problems…

2 Answers

Check memory usage on the box. I’ve often seen it complain like that when its struggled to build the instance. Or try clearing the git repo on the server.

  • It doesn’t seem like either of these are the problem. Memory usage is low and I cleared the git repo. Still the same problem.

Check on the stack trace just below the following lines, you’ll be able to see the error;

CHECKS file not found in container: running simple container check…
-----> Waiting for 35 seconds …
remote: App container failed to start!!
=====> yourAppName container output:

If the error is, Error: MONGO_URL must be set in environment. Then it’s evident that you haven’t created your database for the app.

If the error is, Error: ROOTURL must be set in environment. Then you’ll need to set-up your rooturl in the environment.
This resource might be of help, Dokku on DigitalOcean

Been running into this problem but figured out. Hope this helps. :)

Have another answer? Share your knowledge.