git push error: unpacker error and Updates were rejected because a pushed branch tip is behind its remote counterpart

Issue #11037 resolved
Guangbin Liu created an issue

Dear Sir/Madam,

Several of our developers complained that they can't git push their changes with error unpacker error and Updates were rejected because a pushed branch tip is behind its remote counterpart.

Following is the screen capture. Could you please let know how to fix this probelm and what caused it? Due to the git push error, they can't work on the development now.

Thanks for your help!

$ git fetch

$ git pull
Already up-to-date.

$ git push

warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:
git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 242, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (61/61), 5.87 KiB | 0 bytes/s, done.
Total 61 (delta 39), reused 0 (delta 0)

**remote: error: insufficient permission for adding an object to repository database objects

remote: fatal: failed to write object

error: unpack failed: unpack-objects abnormal exit


! [rejected] feature/SL-2666 -> feature/SL-2666 (non-fast-forward)

! [remote rejected] feature/SL-3180 -> feature/SL-3180 (unpacker error)

! [remote rejected] feature/SL-3288 -> feature/SL-3288 (unpacker error)

! [rejected] master -> master (non-fast-forward)

error: failed to push some refs to ''**

hint: Updates were rejected because a pushed branch tip is behind its remote

hint: counterpart. If you did not intend to push that branch, you may want to

hint: specify branches to push or set the 'push.default' configuration variable

hint: to 'simple', 'current' or 'upstream' to push only the current branch.

Comments (14)

  1. Rob Emenecker

    Up until several hours ago I was able to fully interact with the BitBucket repo via SSH. Using SSH is our normal configuration on our development teal. I have switched my repo access to using HTTPS. With HTTPS I am able to use the BitBucket repo, however I now am prompted for a password for every git command that I use --- it is killing my productivity.

  2. Neven Blazic

    I have same error since last night.

    ! [remote rejected] feature/COMPANY_PAGES -> feature/COMPANY_PAGES (unpacker error)

  3. Erik van Zijst

    Also, this (stale refs) issue was caused by a problem in our http caching layer that was incorrectly caching clones.

  4. Rob Emenecker

    Hi Eric,

    I understand how Git works. However, when working with an SSH key that DOES NOT contain a password, I don't expect to be prompted for one. :-)


  5. Erik van Zijst

    Not sure I follow. In your comment you said the prompting started after you switched to using HTTPS.

  6. Log in to comment