# fetch failure from git2.kernel.org?

6 messages from 2007-04-22 to 2007-04-22. Participants: Randal L. Schwartz, Alex Riesen, Petr Baudis, Linus Torvalds, Junio C Hamano.
Thread: https://gitlist.dev/t/7777

## Randal L. Schwartz, 2007-04-22 10:03

Subject: fetch failure from git2.kernel.org?
Message-ID: <86fy6ssp32.fsf@blue.stonehenge.com>
URL: https://gitlist.dev/e/86fy6ssp32.fsf%40blue.stonehenge.com

```

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, 2007-04-22 12:53

Subject: Re: fetch failure from git2.kernel.org?
Message-ID: <20070422125307.GA2431@steel.home>
URL: https://gitlist.dev/e/20070422125307.GA2431%40steel.home
In-Reply-To: <86fy6ssp32.fsf@blue.stonehenge.com>

```
Randal L. Schwartz, Sun, Apr 22, 2007 12:03:45 +0200:
> 
> 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, 2007-04-22 12:56

Subject: Re: fetch failure from git2.kernel.org?
Message-ID: <86ps5wr2id.fsf@blue.stonehenge.com>
URL: https://gitlist.dev/e/86ps5wr2id.fsf%40blue.stonehenge.com
In-Reply-To: <20070422125307.GA2431@steel.home>

```
>>>>> "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, 2007-04-22 14:20

Subject: Re: fetch failure from git2.kernel.org?
Message-ID: <20070422142020.GR4489@pasky.or.cz>
URL: https://gitlist.dev/e/20070422142020.GR4489%40pasky.or.cz
In-Reply-To: <20070422125307.GA2431@steel.home>

```
On Sun, Apr 22, 2007 at 02:53:07PM CEST, Alex Riesen wrote:
> 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. :-)

> >     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, 2007-04-22 17:53

Subject: Re: fetch failure from git2.kernel.org?
Message-ID: <alpine.LFD.0.98.0704221050350.9964@woody.linux-foundation.org>
URL: https://gitlist.dev/e/alpine.LFD.0.98.0704221050350.9964%40woody.linux-foundation.org
In-Reply-To: <86fy6ssp32.fsf@blue.stonehenge.com>

```


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, 2007-04-22 18:26

Subject: Re: fetch failure from git2.kernel.org?
Message-ID: <7virbonu4m.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7virbonu4m.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <alpine.LFD.0.98.0704221050350.9964@woody.linux-foundation.org>

```
Linus Torvalds <torvalds@linux-foundation.org> writes:

> 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));

```
