When a Git deploy fails

Read the deployment log first, then fix the handful of usual causes — wrong branch, revoked access, a private repo linked by URL, or a "successful" deploy that changed nothing.

A Git deploy can go wrong two ways: it fails outright with a red status, or it reports success while your server somehow runs yesterday's code. Both are readable straight from the Git page. This guide walks the deployment log and the short list of causes behind each.

At a glance
You need A server with a repository linked and deploying — see Deploy from Git
First move Open the Git page → Deployments tab and read the log

Start at the deployment log

Open the Git page and switch to the Deployments tab. It lists every deploy with a status; a failed one shows in red. Click it and read its log. Most of the time the log names the cause outright — branch not found, authentication failed, a post-deploy command that errored. Read that first; the rest of this guide is what it usually says.

When the deploy fails outright

  • Wrong branch linked. If you renamed your default branch (the classic mastermain, or the reverse) or deleted the one you linked, the deploy can't find it. Open the Code tab and set the deploy branch to one that exists.
  • Repo access revoked or expired. For an account-connected repo, an expired OAuth token — or access you revoked on GitHub / GitLab / Bitbucket — makes the pull fail with an auth error. Reconnect the account on the Git page.
  • A private repo linked by URL. Pasting a public URL only works for public repos; a private one fails to clone. Connect the GitHub / GitLab / Bitbucket account with OAuth instead — that's the only way in to a private repository.
  • A post-deploy command errored. If the pull worked but a build step failed, the failing command is right there in the log. See Build steps on deploy.

When it "succeeded" but nothing changed

The deploy is green, yet the server acts unchanged. Usually one of these:

  • The app is still running the old code. A deploy copies files in; it doesn't restart your app on its own. If the deploy's post-deploy action is None, your running process keeps the code it started with. Set the action to Restart so the app reloads on each deploy — see Auto-deploy on push.
  • A build step was skipped. A post-deploy command can be limited to run only when the server is online (or only offline). If its condition doesn't match the server's state at deploy time, it's quietly skipped — a green deploy with no build. Check the command's run condition on the Git page.
  • Files you deleted from the repo are still on the server. A file you removed from the repo stays on the server until you delete it in the File Manager.
  • The entry file is in a subfolder. If your repo keeps its entry point in, say, src/ or app/, the application won't find it at the root. Point the Main file (Node) or App py file (Python) variable at the right path in Settings, or restructure so the entry file lands at the root — see the layout note in Deploy from Git.

⚠️ Heads up: Deploys copy and overwrite — they never delete. It's the same behavior that keeps your .env safe across deploys; it just cuts both ways.

When a push doesn't deploy at all

You pushed, but the Deployments tab shows no new entry. Whether a push deploys depends on how the repo is linked:

  • Account-connected repos (GitHub / GitLab / Bitbucket via OAuth) get a push webhook — a push triggers a deploy once you've turned auto-deploy on.
  • Public repos linked by URL have no webhook. They deploy on a schedule (every 1, 6, 12, or 24 hours) or when you press Deploy by hand.

So if you linked by URL and expected pushes to deploy instantly, that's the mismatch — connect the account for webhooks, shorten the scheduled-pull interval, or just deploy manually. Auto-deploy on push sets this up properly.

The rollback move

💡 Tip: When a deploy ships broken code and you need the site back now, don't debug live — roll back.

The deployment history lets you pin a deployment to a specific commit, so pin the last one that worked. Your server returns to that known-good code while you fix the problem on your own time, then deploy again.


Still stuck?

Was this guide helpful?