[Gta04-owner] Problem with repo
Dr. H. Nikolaus Schaller
hns at goldelico.com
Sat Mar 15 10:51:53 CET 2014
Am 15.03.2014 um 07:03 schrieb Alexandre Roumiantsev:
> Hello
>
>> I just did a git clone http://git.goldelico.com/gta04-kernel.git an
> hour ago
>> and it did work. So it may be a network timeout that is reported as a
> generic
>> "Fetch failed" by git?
>>
>
> I able to clone ( git clone http://git.goldelico.com/gta04-kernel.git )
> and have done it 3-5 times in few days. Problem is that I could not do
> repo sync ( or equivalent git fetch ) neither after successful cloning
> nor after full ( rm -rf * ; rm -rf .* ) or partial ( rm
> -rf .repo/projects/kernel/goldelico/gta04.git/ ) cleaning of git
> directory.
> The result message is stable:
>> ran at ubuntu:~/replicant-4.2$ repo sync gta04-kernel.git
>> Fetching project gta04-kernel.git
>> error: Unable to find 2f500a5268ad4d18399913029c6f8f61198d3a63 under
>> http://git.goldelico.com/gta04-kernel.git
>> Cannot obtain needed object 2f500a5268ad4d18399913029c6f8f61198d3a63
>> error: Fetch failed.
>> error: Unable to find 2f500a5268ad4d18399913029c6f8f61198d3a63 under
>> http://git.goldelico.com/gta04-kernel.git
>> Cannot obtain needed object 2f500a5268ad4d18399913029c6f8f61198d3a63
>> error: Fetch failed.
>> error: Cannot fetch gta04-kernel.git
>
> The problem I found after March 1-2 weekend and first report Marth 4.
I have found a note that this may be the result of an interrupted git fetch (ctl-C or network timeout):
<http://stackoverflow.com/questions/10671638/how-to-fix-git-repository-broken-by-interrupted-git-fetch>
And it may be a more common problem:
<https://groups.google.com/forum/#!topic/mozilla.dev.b2g/RViAG2cNYws>
Then I tried on my local copy:
cd .repo/projects/kernel/goldelico/gta04-kernel.git
git fetch goldelico
and also got this message - with a different object hash.
Running git gc didn't change anything.
But git fsck did report some "dangling commit" including the
one reported as "while processing commit" by git fetch.
After some more google I found this command sequence:
git fsck
git reflog expire --expire-unreachable=now --all
git gc --prune=now
git fsck
I still had some (which are empty so I removed them)
bad sha1 file: ./objects/38/798e0f084bf9dcf31a9c6de871e53dabc2ae3d.temp
Then, a git fsck did run completely clean.
But git fetch still failed.
So this is not the real problem.
Another bug report confirms that it is a git ctl-C bug (and neither server nor client nor repo):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602528
The solution appears to be (ignore the "does not point to a valid object!" errors):
cd .repo/projects/kernel/goldelico/gta04.git
rm objects/pack/pack-*.idx objects/*/*.temp
git fetch goldelico
The fetch will then run several ten minutes (so be patient and don't ctl-C).
Hope this helps for you as well.
BR,
Nikolaus
More information about the Gta04-owner
mailing list