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

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…

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You need to remove .deploy.lock file if exists in your application folder

rm -rf /home/dokku/YOUR_APP_NAME/.deploy.lock

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

-----> 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: ROOT_URL must be set in environment. Then you'll need to set-up your root_url in the environment.
This resource might be of help, [Dokku on DigitalOcean](

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

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.