git unpack error on push to gerrit
새 분기를 gerrit 서버로 푸시 할 때 다음 오류가 발생합니다.
de@roma:~/git-hate/www$ git push origin landingpage
Counting objects: 149, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (73/73), done.
Writing objects: 100% (111/111), 2.77 MiB, done.
Total 111 (delta 68), reused 80 (delta 38)
remote: Resolving deltas: 100% (68/68)
error: unpack failed: error Missing tree 30c4809ade0b4b0c81cb7f882450774862b82361
fatal: Unpack error, check server log
To ssh://user@git-server/repository
! [remote rejected] landingpage -> landingpage (n/a (unpacker error))
error: failed to push some refs to 'ssh://user@git-server/repository'
언급 한 트리 객체를 원격 git에 수동으로 복사하려고했습니다.
gerrit 측에서 우리는 스택 트레이스를 얻습니다.
[2013-05-16 13:43:42,753] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user de account 1000000) during git-receive-pack '/repository'
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:157)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:106)
at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:34)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:72)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:430)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:337)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: Unpack error on project "repository":
AdvertiseRefsHook: org.eclipse.jgit.transport.AdvertiseRefsHookChain@7047125class org.eclipse.jgit.transport.AdvertiseRefsHookChain
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:156)
... 13 more
Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing pack stream
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:202)
at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:142)
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:98)
... 13 more
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing tree 30c4809ade0b4b0c81cb7f882450774862b82361
at org.eclipse.jgit.transport.BaseReceivePack.checkConnectivity(BaseReceivePack.java:996)
at org.eclipse.jgit.transport.BaseReceivePack.receivePackAndCheckConnectivity(BaseReceivePack.java:756)
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:167)
... 15 more
여러분 : 무엇을해야할지 아이디어가 있습니까?
--no-thin
인수로 푸시 하면 해결 방법으로 사용할 수 있습니다.
git push --no-thin omnigerrit HEAD:refs/for/android-4.4
git> 1.8.4.2를 사용하고 있습니까?
https://github.com/git/git/commit/fbd4a7036dfa71ec89e7c441cef1ac9aaa59a315 때문에 git 1.8.4.3+와 gerrit 2.6 사이의 비 호환성을 발견했습니다.
이 향상된 기능을 통해 git이 트리 sha1이 서버에 이미 존재하는 것을 발견하면 다시 보내지 않지만 gerrit는 업로드 된 팩의 커밋 sha1과 관련된 트리 sha1을 검색하려고합니다.
최신 버전의 scm-manager가 아닌 gerrit 2.8-rc3에서는 재현 할 수없는 것 같습니다. 나는 이것이 jgit에서 해결되었다고 말하고 싶지만 아직 어떤 버전을 찾을 수 없습니다.
내 경우
나는 또한이 문제가 발생 하고이 문제를 해결하는 데 오랜 시간이 걸립니다.
먼저 gerrit 로그에 오류 정보가 하나 있습니다.
Internal server error (user newptone account 1) during git-receive-pack '/neutron.git'
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
......
... Missing unknown 613fd2557fba30aff2dbd51c3807cc57561bab08
613fd2557fba30aff2dbd51c3807cc57561bab08 객체는 무엇입니까?
그런 다음 git review -l을 사용하여이 프로젝트 중성자에 대해 열려있는 모든 패치 세트를 검색합니다.
1974 master Add two interfaces for manipulate forwarding individually
그런 다음 검색을 통해 gerrit 대시 보드에서이 패치 세트를 찾고 링크를 클릭하면 오류가있는 것 같습니다.
613fd2557fba30aff2dbd51c3807cc57561bab08 cannot found
아하, 그게 이유야!
그런데 왜이 물건이 없어 졌을까요?
그 이유는 동료가 중성자 프로젝트가 새 저장소를 사용하여 이전 저장소를 사용할 것이라고 말하고 이전 저장소를 삭제했지만 gerrit에서 열려있는 모든 패치 세트를 닫지 않았기 때문입니다. 열린 패치 세트는 gerrit 대시 보드에서 사라지지만 gerrit 데이터베이스에는 여전히 존재합니다.
how to fix it
Login in your reviewdb sql and find this record:
First, make sure this is the one we want to modify:
select * from changes where change_id=1974\G;
Then update this record:
update changes set open='N',status='A' where change_id=1974;
I just encountered this error as well.
For my scenario, I was attempting to push an amended commit where none of the files had changed since the last time the same commit was pushed. I literally had just amended the commit message for the change, and attempted to push again. No files as part of the commit changed.
My push was rejected with the same error message you posted.
It seemed that Gerrit did not like a push with no changes other than the amended commit message.
I literally made a one character change to a file, added the file, amended the commit again, and pushed, and the push succeeded.
I'm using git == 1.8.4.2
I had this problem today and tried all the suggestions. Finally the solution was very simple:
- Switch to another branch (e.g. develop).
- Pull from the remote repository
- Switch back to your new branch and push.
With any luck it'll work now.
I encountered this issue today and I was not using git > 1.8.4.2. I am on Gerrit 2.7.
After around 5 minutes of frustration, I decided to just switch to the local version of the branch I was trying to push to and I did a pull. After that, my pushes started working again but I do not understand why.
I just come with this issue just now,and my case is: Some one git init and push a whole new branch (that is to say,this branch is no relation with any revision in origin git in gerrit) to a git project in gerrit. I try many way but fail. In the end I am inspired by the answer of @obuseme ,follow this and fixed:
git remote add gerrit GERRIT_GIT_PROJECT_URL
git fetch gerrit
And then upload again.
I worked around this issue by re-cloning the repository, and copying my changes over from the old one.
The other solutions did not work for me, except I did not try obrienks.
I tried with git 2.6.1 as well as with JGit 4.6.1, and I use Gerrit 2.13.1.
When you get the unpack error, you might want to look for this line as well: remote: error: unable to create temporary file: No space left on device
Deleting a couple of old backup files freed up enough space to get it working again.
참고URL : https://stackoverflow.com/questions/16586642/git-unpack-error-on-push-to-gerrit
'IT Share you' 카테고리의 다른 글
Backbone에서 뷰 믹스 인을 수행하는 적절한 방법 (0) | 2020.12.10 |
---|---|
Jquery each-루프 중지 및 객체 반환 (0) | 2020.12.10 |
탐색 속성이없는 EF 코드 첫 번째 외래 키 (0) | 2020.12.10 |
Phonegap Cordova Ajax에서 404 (찾을 수 없음) 오류 요청 (0) | 2020.12.10 |
jquery (또는 순수 js)는 테스트를 위해 누른 Enter 키를 시뮬레이션합니다. (0) | 2020.12.10 |