GitBlit中出现 error: remote unpack failed: error Missing tree

Posted Chuck Lu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GitBlit中出现 error: remote unpack failed: error Missing tree相关的知识,希望对你有一定的参考价值。

[email protected] MINGW64 /d/ChuckLu/Git/Edenred/LISA_5.0.0.0 (local)
$ git push origin preaction:preaction
Counting objects: 3717, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1631/1631), done.
Writing objects: 100% (3717/3717), 779.13 KiB | 5.19 MiB/s, done.
Total 3717 (delta 3063), reused 2480 (delta 2019)
remote: Resolving deltas: 100% (3063/3063)
error: remote unpack failed: error Missing tree eb96e0534e08fe512113b25a99d783278e04e8b1
To http://172.31.212.149:8080/r/LISA/LISA_5.0.0.0.git
! [remote rejected] preaction -> preaction (n/a (unpacker error))
error: failed to push some refs to ‘http://[email protected]:8080/r/LISA/LISA_5.0.0.0.git‘

 

[email protected] MINGW64 /d/ChuckLu/Git/Edenred/LISA_5.0.0.0 (local)
$ git show eb96e05
tree eb96e05

App_Browsers/
App_Code/
App_Data/
App_Themes/
CMSAdminControls/
CMSDesk/
CMSEdit/
CMSFormControls/
CMSHelp/
CMSInlineControls/
CMSMasterPages/
CMSMessages/
CMSModules/
CMSPages/
CMSResources/
CMSScripts/
CMSSiteManager/
CMSTemplates/
CMSWebParts/
Chile/
ClientBin/
ConstantFile/
Default.aspx
Default.aspx.cs
Global.asax
Holcim/
Images/
LISA.CMSWeb.50.wpp.targets
Nestle/
RESTService.svc
Remoting.config
SamSung/
Scripts/
Views/
clientaccesspolicy.xml
en-US/
favicon.ico
jQueryCarousel/
parameters.config
web.config
website.publishproj
wse3policy.config

 

[email protected] MINGW64 /d/ChuckLu/Git/Edenred/LISA_5.0.0.0 (local)
$ git push --no-thin origin preaction:preaction
Counting objects: 3717, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1631/1631), done.
Writing objects: 100% (3717/3717), 779.13 KiB | 4.99 MiB/s, done.
Total 3717 (delta 3063), reused 2480 (delta 2019)
remote: Resolving deltas: 100% (3063/3063)
error: remote unpack failed: error Missing tree eb96e0534e08fe512113b25a99d783278e04e8b1
To http://172.31.212.149:8080/r/LISA/LISA_5.0.0.0.git
! [remote rejected] preaction -> preaction (n/a (unpacker error))
error: failed to push some refs to ‘http://[email protected].149:8080/r/LISA/LISA_5.0.0.0.git‘

 

 

解决方案:

https://github.com/gitblit/gitblit/issues/704

https://github.com/gitblit/gitblit/issues/989

http://gitblit.com/faq.html

push failed for branch (n/a (unpacker error))

This is a bug in JGit (issue 408). TLDR: Newer git clients are optimized to send less data on the wire. JGit expects complete data to be sent, but there are scenarios where native git can optimize-out sending objects. By default, JGit requires everything sent be complete and referenceable.

If you experience this, the workaround is to temporarily disable the reachable check for the receive pack, push, and then re-enable the setting.

git.checkReferencedObjectsAreReachable = false

在GitBlit的服务端配置中添加上面的代码,就可以确保push成功。等到push成功之后,再删除这段配置。

 

以上是关于GitBlit中出现 error: remote unpack failed: error Missing tree的主要内容,如果未能解决你的问题,请参考以下文章

jenkins学习16-无法连接仓库:Error performing git command: git ls-remote -h

记录:拷贝gitblit里的项目使用git命令clonepullpush等,出现一直在加载,卡住没反应的问题

git 服务器gitblit配置

fatal:remote error:Git repository not found

remote:error:refusing to update checked out branc

Transport Error: Cannot get remote repository refs.https://github.com/xxx/test1.git: cannot open git