Rebasely Beta: data may be purged

Push errors

What git prints when Rebasely refuses a push, and how to get the push through. A refused push changes nothing: no branch or tag moves and nothing is stored.

Rebasely's reason appears in parentheses at the end of the ! [remote rejected] line, or after remote: and remote unpack failed: error.

The push is larger than 100 MB

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

remote: Rebasely: this push is over the 100 MB request limit. See https://rebasely.com/docs/errors#413
fatal: the remote end hung up unexpectedly

One push can send at most 100 MB (100,000,000 bytes), counting the pack git builds for it. Most larger requests are refused before Rebasely reads them, so git can print only the HTTP status. When Rebasely had already started on the push, git prints the second message instead.

To push a large history, send it in parts, oldest first. For example, push a commit about halfway back, then the rest:

git push origin HEAD~500:refs/heads/main
git push origin main

A single commit that adds more than 100 MB of files cannot be pushed. Keep build output, datasets and media out of the repository; Rebasely does not support Git LFS (why, and what to do instead). Raising http.postBuffer does not help: the limit applies to the whole request.

Server busy: large push could not be processed

 ! [remote rejected] main -> main (server busy: large push could not be processed, retry later)

Pushes with a pack over 32 MiB, with a single file over 8 MiB, or whose files take far more space than the pack (for example many versions of a large file) are processed in a separate sandbox. It was busy or unavailable, so the push was refused. Retry in a few minutes.

Verification service unavailable

 ! [remote rejected] main -> main (verification service unavailable, retry)

Some pushes are checked with real git before any branch moves: pushes that add submodules, symlinks or .gitmodules and .gitattributes files, pushes from accounts younger than 7 days, and large pushes. The checker could not run, so the push was refused. Retry in a few minutes.

An active Rebasely token in the push

 ! [remote rejected] main -> main (push contains an active Rebasely token in deploy.env; it has been revoked)

A file in the push contains one of your access tokens. Rebasely revoked the token at once and emailed its owner, because anyone who can read the repository could have used it.

Remove the token from the file and from every commit in the push (git commit --amend for the last commit, git rebase -i for older ones), create a new token in your token settings, keep it out of the repository, and push again.

Fetch first

 ! [remote rejected] main -> main (fetch first)

The branch moved on the server since you last fetched it, for example because someone else pushed. Run git pull --rebase (or fetch and merge), then push again. A tag that already exists gets already exists instead.

Protected branch

 ! [remote rejected] main -> main (protected branch: force-push not allowed)
 ! [remote rejected] main (protected branch: deletion not allowed)
 ! [remote rejected] main -> main (protected branch: push not allowed for role writer)
 ! [remote rejected] main -> main (protected branch: required check build has not succeeded)

The branch has a protection rule. Push a commit that builds on the branch instead of rewriting it, push to another branch, or ask an owner of the repository to change the rule in the repository's settings.

Deleting the default branch

 ! [remote rejected] main (deletion of the current branch prohibited)

The repository's default branch cannot be deleted, protected or not, because clones start from it. An owner can pick another default branch in the repository's settings first.

Rate, size and ref limits

 ! [remote rejected] main -> main (rate limited: 300 pushes in the last hour (limit 300))
 ! [remote rejected] main -> main (rate limited: 20,000 pushes to this organization today (UTC); retry tomorrow)
 ! [remote rejected] main -> main (repository is over its 5 GB limit)
 ! [remote rejected] topic -> topic (repository has too many refs (limit 100,000))

A repository takes at most 300 pushes an hour and 5,000 a day, holds at most 5 GB and 100,000 branches and tags. All repositories of an organization together take at most 20,000 pushes a day (UTC). Wait before pushing again, or delete branches and tags you no longer need.

Read-only repository

 ! [remote rejected] main -> main (repository is read-only: pushes are paused)
 ! [remote rejected] main -> main (repository is read-only: integrity check failed)

Rebasely paused pushes to this repository. The reason after the colon says why:

pushes are paused: Rebasely paused pushes for maintenance or an incident. Clones and fetches still work, and pushes resume without anything for you to do.

integrity check failed: real git rejected objects already pushed to the repository. Until the Rebasely team has reviewed it, clones and fetches are paused too, except for owners of the organization, who got an email and can still clone and fetch their work with an access token. Nothing was deleted.

git may print remote: This repository is read-only. instead, before it sends anything.

Invalid or unsafe objects

error: remote unpack failed: error object check failed (hasDotgit)
error: remote unpack failed: error invalid pack (truncated)
error: remote unpack failed: error missing necessary objects

Rebasely checks every object in a push the way git fsck --strict does, and also refuses paths that can harm a checkout, such as .git look-alikes and unsafe .gitmodules entries. The name in parentheses is git's own check. Run git fsck --strict in your repository to find the object, and rewrite the commits that contain it.

Other limits: an object can be at most 100 MiB, a push at most 1,000,000 objects, and a tree at most 100,000 entries. missing necessary objects means the push refers to a commit or file the server does not have; fetch and push again.

Repository busy

 ! [remote rejected] main -> main (repository busy, retry)

Many pushes reached the repository at the same moment, or the server restarted during the push. Nothing changed. Retry the push.

Refs outside branches, tags and notes

 ! [remote rejected] HEAD -> refs/pull/1/head (deny updating a hidden ref)
 ! [remote rejected] HEAD -> refs/other/x (refusing to update ref outside refs/heads, refs/tags or refs/notes)

Pushes can create and update branches (refs/heads/), tags (refs/tags/) and notes (refs/notes/), and update sandboxes (refs/sandbox/, below). Other refs are managed by Rebasely. A push also takes at most 1,000 ref updates, and a ref name at most 255 bytes.

Sandbox branches

 ! [remote rejected] HEAD -> refs/sandbox/a-fixer/try (sandbox does not exist: create it with rebasely sandbox create)
 ! [remote rejected] HEAD -> refs/sandbox/a-other/try (sandbox belongs to another owner)
 ! [remote rejected] HEAD -> refs/sandbox/a-fixer/try (sandbox is expired)

A sandbox (refs/sandbox/<owner>/<name>) is created with rebasely sandbox create or the API, never by a push, and only its owner (or an owner of the repository) pushes to it. One without a push for its time to live expires; create a new one. See sandboxes for the whole flow, and the Rebasely agent skill for agents.

Live branches

 ! [remote rejected] feature -> feature (live branch moved: fetch first)
 ! [remote rejected] feature -> feature (live branch: force-push not allowed (disable live first))
 ! [remote rejected] feature (live branch: disable live first)
 ! [remote rejected] feature -> feature (live branch busy, retry)

The branch is live: people or agents are editing it, and Rebasely commits their edits as checkpoints. Pull the latest checkpoint and push again. Force-pushes and deletes are refused until a writer turns live off for the branch. How pushes and live edits fit together.