Error map

error: unable to resolve reference 'refs/heads/main': reference broken fatal: bad object refs/heads/main

Git · layer 7, Build & delivery

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

error: unable to resolve reference 'refs/heads/main': reference broken — fatal: bad object refs/heads/main (Git)error: unab…corrupt object — error: object file .git/objects/x is empty / fatal: loose object is corrupt (Git)corrupt objectbroken ref — warning: ignoring broken ref refs/remotes/origin/HEAD (Git)broken referror: Ref refs/heads/main is at X but expected Y — error: failed to update ref: refs/heads/main is at a1b2 but expected c3d4 (Git)error: Ref refs/hea…error: cannot update the ref 'HEAD': unable to append to logs — error: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Permission denied (Git)error: cannot updat…error: inflate: data stream error / loose object is corrupt — error: inflate: data stream error (incorrect header check) error: unable to unpack header (Git)error: inflate: dat…error: bad index file sha1 signature / index file corrupt — error: bad signature 0x00000000 fatal: index file corrupt (Git)error: bad index fi…fatal: Branch rename failed — fatal: Branch rename failed (Git)fatal: Branch renam…Disk Utility: First Aid process has failed (APFS) — File system check exit code is 8 / Volume could not be verified completely (macOS)Disk Utility: First…error: Could not read ... fatal: pack has bad object / index-pack failed — fatal: pack has bad object at offset 12345: inflate returned -3 (Git)error: Could not re…fatal: Cannot rebase onto multiple branches — fatal: Cannot rebase onto multiple branches. (Git)fatal: Cannot rebas…fatal: 'x y' is not a valid branch name — fatal: 'feature/my branch' is not a valid branch name. (Git)fatal: 'x y' is not…index.lock exists — fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running in this repository (Git)index.lock existsrebase in progress — fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase. (Git)rebase in progressunfinished merge — fatal: You have not concluded your merge (MERGE_HEAD exists). Please, commit your changes before you merge. (Git)unfinished mergeremote origin exists — error: remote origin already exists. (Git)remote origin existsRepository not found — remote: Repository not found. fatal: repository 'https://github.com/x/y.git/' not found (Git)Repository not foundcannot lock ref — error: cannot lock ref 'refs/remotes/origin/x': is at … but expected … / unable to update local ref (Git)cannot lock refnon-fast-forward — Git: ! [rejected] … (fetch first) — error: failed to push some refs (Git)non-fast-forwardsrc refspec — error: src refspec main does not match any (Git)src refspecRPC failed — error: RPC failed; HTTP 400 curl 22 / curl 92 HTTP/2 stream was not closed cleanly — the remote end hung up unexpectedly (Git)RPC failed0x80070005 — Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied (Windows)0x80070005UNPROTECTED PRIVATE KEY FILE — WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0644 for 'key.pem' are too open (Linux)UNPROTECTED PRIVATE…Resource not accessible by integration — GitHub Actions: Error: Resource not accessible by integration (403) (CI/CD)Resource not access…Volume failed to unmount / disk not ejected because in use — macOS: diskutil: Unmount of disk2s1 failed: at least one volume could not be unmounted / The disk wasn't ejected because one or more programs may be using it (macOS)Volume failed to un…Commit unreachable after gc (reflog expired) — error: Could not read 4b825dc642cb6eb9a060e54bf8d69288fbee4904 / bad object after git gc (Git)Commit unreachable …error: Unpack failed / remote unpack failed: unable to create temporary object directory — remote: error: unable to create temporary object directory (Git)error: Unpack faile…Automatic Repair couldn't repair your PC — Automatic Repair couldn't repair your PC — Log file: C:\Windows\System32\Logfiles\Srt\SrtTrail.txt (Windows)Automatic Repair co…Lost commits after git reset --hard (recover with reflog) — HEAD is now at a1b2c3d Old commit (Git)Lost commits after …error: Entry 'file' not uptodate. Cannot merge. — error: Entry 'app.js' not uptodate. Cannot merge. fatal: Merge with strategy recursive failed. (Git)error: Entry 'file'…branch exists — fatal: a branch named 'x' already exists (Git)branch existserror: The branch is not fully merged — error: The branch 'feature/x' is not fully merged. If you are sure you want to delete it, run 'git branch -D feature/x'. (Git)error: The branch i…error: Cannot delete branch checked out at — error: Cannot delete branch 'main' checked out at '/home/user/repo' (Git)error: Cannot delet…Time Machine couldn't complete the backup — macOS: Time Machine couldn't complete the backup. / The backup disk image could not be mounted / Backup failed with error 18/19/21/22 (macOS)Time Machine couldn…Login password not accepted after reset / FileVault recovery — (behavior) FileVault asks for recovery key at startup (macOS)Login password not …early EOF — fatal: early EOF — fatal: index-pack failed (Git)early EOFAuto packing the repository in background for optimum performance — Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. (Git)Auto packing the re…remote: fatal: pack exceeds maximum allowed size — remote: fatal: pack exceeds maximum allowed size (2.00 GiB) (Git)remote: fatal: pack…Rebase stopped: CONFLICT (content), resolve then git rebase --continue — Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue". (Git)Rebase stopped: CON…git merge -X theirs vs ours (swapped during rebase) — (behavior) "ours" and "theirs" are reversed in git rebase (Git)git merge -X theirs…warning: refname 'v1' is ambiguous — warning: refname 'release' is ambiguous. Git normally never creates a ref that ends with 40 hex characters (Git)warning: refname 'v…fatal: branch is already checked out at (worktree) — fatal: 'feature/x' is already checked out at '/home/user/repo-wt' (Git)fatal: branch is al…fatal: invalid reference: branch — fatal: invalid reference: feature/login (Git)fatal: invalid refe…Bitbucket: Branch permissions prevent push — remote: Branch permissions: You are not allowed to push to branch main (Git)Bitbucket: Branch p…

Directly related (11)

corrupt objectGit

error: object file .git/objects/x is empty / fatal: loose object is corrupt

The local Git object database is corrupted — usually after a crash, disk full or sync tool interference.

broken refGit

warning: ignoring broken ref refs/remotes/origin/HEAD

A ref file is empty or points to a missing object — usually refs/remotes/origin/HEAD after the default branch changed.

error: Ref refs/heads/main is at X but expected YGit

error: failed to update ref: refs/heads/main is at a1b2 but expected c3d4

Another process changed the ref while Git updated it.

error: cannot update the ref 'HEAD': unable to append to logsGit

error: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Permission denied

Git can't write reflog or ref files.

error: inflate: data stream error / loose object is corruptGit

error: inflate: data stream error (incorrect header check) error: unable to unpack header

A Git object file is damaged.

error: bad index file sha1 signature / index file corruptGit

error: bad signature 0x00000000 fatal: index file corrupt

The staging area file `.git/index` is damaged.

fatal: Branch rename failedGit

fatal: Branch rename failed

Git couldn't rename the branch.

Disk Utility: First Aid process has failed (APFS)macOS

File system check exit code is 8 / Volume could not be verified completely

Disk Utility found APFS errors it couldn't repair.

error: Could not read ... fatal: pack has bad object / index-pack failedGit

fatal: pack has bad object at offset 12345: inflate returned -3

A packfile is damaged.

fatal: Cannot rebase onto multiple branchesGit

fatal: Cannot rebase onto multiple branches.

The branch name you gave matches several refs.

fatal: 'x y' is not a valid branch nameGit

fatal: 'feature/my branch' is not a valid branch name.

The branch name contains characters Git forbids.

Two steps away (32)

index.lock existsGit

fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running in this repository

A lock file from another (or crashed) Git process blocks this command.

rebase in progressGit

fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase.

A previous rebase is still in progress (or was interrupted).

unfinished mergeGit

fatal: You have not concluded your merge (MERGE_HEAD exists). Please, commit your changes before you merge.

A merge is still in progress — conflicts were resolved (or not) but not committed.

remote origin existsGit

error: remote origin already exists.

A remote named origin is already configured.

Repository not foundGit

remote: Repository not found. fatal: repository 'https://github.com/x/y.git/' not found

GitHub/GitLab says the repository doesn’t exist — or you lack access to a private repo.

cannot lock refGit

error: cannot lock ref 'refs/remotes/origin/x': is at … but expected … / unable to update local ref

Git couldn’t update a reference — stale remote-tracking refs, case-only branch name clashes, or a leftover lock file.

non-fast-forwardGit

Git: ! [rejected] … (fetch first) — error: failed to push some refs

The remote branch has commits you don’t have locally, so Git refuses to overwrite them. Pull (merge or rebase) first, then push.

src refspecGit

error: src refspec main does not match any

You pushed a branch name that doesn’t exist locally — usually no commits yet, or the branch is called master not main.

RPC failedGit

error: RPC failed; HTTP 400 curl 22 / curl 92 HTTP/2 stream was not closed cleanly — the remote end hung up unexpectedly

A large HTTPS push/clone broke mid-transfer — size limits, proxies or flaky HTTP/2.

0x80070005Windows

Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied

Windows refused an operation because the account or process lacks permission — seen in Windows Update, installers, Task Scheduler…

UNPROTECTED PRIVATE KEY FILELinux

WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0644 for 'key.pem' are too open

SSH refuses to use a private key that other users can read; it must be readable only by you (chmod 600).

Resource not accessible by integrationCI/CD

GitHub Actions: Error: Resource not accessible by integration (403)

The workflow’s GITHUB_TOKEN doesn’t have the permission needed for that API call (comment, push, create release, write packages).

Volume failed to unmount / disk not ejected because in usemacOS

macOS: diskutil: Unmount of disk2s1 failed: at least one volume could not be unmounted / The disk wasn't ejected because one or more programs may be using it

macOS can't eject a drive because a process still has files open on it.

Commit unreachable after gc (reflog expired)Git

error: Could not read 4b825dc642cb6eb9a060e54bf8d69288fbee4904 / bad object after git gc

A dropped commit was removed because it was unreachable and expired.

error: Unpack failed / remote unpack failed: unable to create temporary object directoryGit

remote: error: unable to create temporary object directory

The server couldn't store the pushed objects.

Automatic Repair couldn't repair your PCWindows

Automatic Repair couldn't repair your PC — Log file: C:\Windows\System32\Logfiles\Srt\SrtTrail.txt

Windows failed to boot repeatedly and Startup Repair couldn’t fix it; SrtTrail.txt records the root cause it found.

Lost commits after git reset --hard (recover with reflog)Git

HEAD is now at a1b2c3d Old commit

A hard reset moved the branch back and your newer commits look gone.

error: Entry 'file' not uptodate. Cannot merge.Git

error: Entry 'app.js' not uptodate. Cannot merge. fatal: Merge with strategy recursive failed.

A file with uncommitted changes would be touched by the merge.

branch existsGit

fatal: a branch named 'x' already exists

You tried to create a branch whose name is already taken locally.

error: The branch is not fully mergedGit

error: The branch 'feature/x' is not fully merged. If you are sure you want to delete it, run 'git branch -D feature/x'.

Git refuses to delete a branch whose commits aren't merged elsewhere.

error: Cannot delete branch checked out atGit

error: Cannot delete branch 'main' checked out at '/home/user/repo'

You can't delete a branch that is checked out in this or another worktree.

Time Machine couldn't complete the backupmacOS

macOS: Time Machine couldn't complete the backup. / The backup disk image could not be mounted / Backup failed with error 18/19/21/22

A Time Machine backup stopped because the destination is unavailable, full, or the backup set is damaged.

Login password not accepted after reset / FileVault recoverymacOS

(behavior) FileVault asks for recovery key at startup

FileVault can't unlock with the current password.

early EOFGit

fatal: early EOF — fatal: index-pack failed

A clone or fetch was cut off mid-transfer.

Auto packing the repository in background for optimum performanceGit

Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping.

Git is running garbage collection after a command.

remote: fatal: pack exceeds maximum allowed sizeGit

remote: fatal: pack exceeds maximum allowed size (2.00 GiB)

The pushed pack is larger than the server allows.

Rebase stopped: CONFLICT (content), resolve then git rebase --continueGit

Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue".

A commit being replayed conflicts with the new base.

git merge -X theirs vs ours (swapped during rebase)Git

(behavior) "ours" and "theirs" are reversed in git rebase

During a rebase Git's "ours" is the branch you rebase onto, and "theirs" is your own commit.

warning: refname 'v1' is ambiguousGit

warning: refname 'release' is ambiguous. Git normally never creates a ref that ends with 40 hex characters

A branch and a tag share a name.

fatal: branch is already checked out at (worktree)Git

fatal: 'feature/x' is already checked out at '/home/user/repo-wt'

A branch can be checked out in only one worktree at a time.

fatal: invalid reference: branchGit

fatal: invalid reference: feature/login

Git can't find a branch or commit with that name.

Bitbucket: Branch permissions prevent pushGit

remote: Branch permissions: You are not allowed to push to branch main

Bitbucket branch restrictions reject your direct push.