threads / discuss / 7777

fetch failure from git2.kernel.org?

Subject: fetch failure from git2.kernel.org?

## tl;dr

6 messages between Apr 22, 2007 and Apr 22, 2007.

replies: 5people: 5as markdown or json

Randal L. Schwartz· Apr 22, 2007, 10:03 UTC · lore
is this known?  transient?
    $ git-fetch
    warning: no common commits
    remote: Generating pack...
    remote: Done counting 0 objects.
    remote: aborting due to possible repository corruption on the remote side.
    fatal: protocol error: bad pack header
    fatal: Fetch failure: git://git2.kernel.org/pub/scm/git/git.git
    $
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Alex Riesen· Apr 22, 2007, 12:53 UTC · re: Randal L. Schwartz · lore

Re: fetch failure from git2.kernel.org?

Randal L. Schwartz, Sun, Apr 22, 2007 12:03:45 +0200:
Show 12 quoted lines
> 
> is this known?  transient?
> 
>     $ git-fetch
>     warning: no common commits
>     remote: Generating pack...
>     remote: Done counting 0 objects.
>     remote: aborting due to possible repository corruption on the remote side.
>     fatal: protocol error: bad pack header
>     fatal: Fetch failure: git://git2.kernel.org/pub/scm/git/git.git
>     $
> 

Confirm this. BTW, git1 and git2 point to the same 140.211.167.38 (poseidon.kernel.org). It used to be different addresses

Randal L. Schwartz· Apr 22, 2007, 12:56 UTC · re: Alex Riesen · lore

Re: fetch failure from git2.kernel.org?

>>>>> "Alex" == Alex Riesen <raa.lkml@gmail.com> writes:

Alex> Confirm this. BTW, git1 and git2 point to the same 140.211.167.38 Alex> (poseidon.kernel.org). It used to be different addresses

Ahh, that's why it didn't help to try changing it. :)
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Petr Baudis· Apr 22, 2007, 14:20 UTC · re: Alex Riesen · lore

Re: fetch failure from git2.kernel.org?

On Sun, Apr 22, 2007 at 02:53:07PM CEST, Alex Riesen wrote:
Show 6 quoted lines
> Randal L. Schwartz, Sun, Apr 22, 2007 12:03:45 +0200:
> > 
> > is this known?  transient?
> > 
> >     $ git-fetch
> >     warning: no common commits
This in itself is weird. :-)
Show 10 quoted lines
> >     remote: Generating pack...
> >     remote: Done counting 0 objects.
> >     remote: aborting due to possible repository corruption on the remote side.
> >     fatal: protocol error: bad pack header
> >     fatal: Fetch failure: git://git2.kernel.org/pub/scm/git/git.git
> >     $
> > 
> 
> Confirm this. BTW, git1 and git2 point to the same 140.211.167.38
> (poseidon.kernel.org). It used to be different addresses

Curiously enough, I have hit no problems with fetching from the repo.or.cz mirror (which is using several months old git version, if that might matter).

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett
Linus Torvalds· Apr 22, 2007, 17:53 UTC · re: Randal L. Schwartz · lore

Re: fetch failure from git2.kernel.org?

On Sun, 22 Apr 2007, Randal L. Schwartz wrote:
> 
> is this known?  transient?

Junio seems to have tightened his permissions on kernel.org, and as a result the most recent pack is unreadable by anybody but him (I'm not sure if such private files even get mirrored out - but even if they do, they will get mirrored out with the same tight permissions and won't be readable).

		Linus
Junio C Hamano· Apr 22, 2007, 18:26 UTC · re: Linus Torvalds · lore

Re: fetch failure from git2.kernel.org?

Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 9 quoted lines
> On Sun, 22 Apr 2007, Randal L. Schwartz wrote:
>> 
>> is this known?  transient?
>
> Junio seems to have tightened his permissions on kernel.org, and as a 
> result the most recent pack is unreadable by anybody but him (I'm not sure 
> if such private files even get mirrored out - but even if they do, they 
> will get mirrored out with the same tight permissions and won't be 
> readable).
That's not *me* per-se, it's Nico ;-). 

Anybody who runs the new pack-objects that has been cooking in 'next' would get this.

I think this patch minimally fixes it, but some existing tests (e.g. t5300) assume that pack/idx are writable which makes them break.

diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index c72e07a..4eb88e8 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1783,11 +1783,17 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
 		write_index_file(last_obj_offset, object_list_sha1);
 		snprintf(tmpname, sizeof(tmpname), "%s-%s.pack",
 			 base_name, sha1_to_hex(object_list_sha1));
+		if (chmod(pack_tmp_name, 0444))
+			die("unable to make temporary pack file readable: %s",
+			    strerror(errno));
 		if (rename(pack_tmp_name, tmpname))
 			die("unable to rename temporary pack file: %s",
 			    strerror(errno));
 		snprintf(tmpname, sizeof(tmpname), "%s-%s.idx",
 			 base_name, sha1_to_hex(object_list_sha1));
+		if (chmod(idx_tmp_name, 0444))
+			die("unable to make temporary index file readable: %s",
+			    strerror(errno));
 		if (rename(idx_tmp_name, tmpname))
 			die("unable to rename temporary index file: %s",
 			    strerror(errno));

← back to recent threads