git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Chuck Ritter" <cfr100@psu.edu>
Cc: git@vger.kernel.org
Subject: Re: git clone error
Date: Sat, 05 Apr 2008 13:09:05 -0700	[thread overview]
Message-ID: <7vabk8vzby.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <a00d3c7f0804051020u366e978ei7252c904c48461f6@mail.gmail.com> (Chuck Ritter's message of "Sat, 5 Apr 2008 13:20:25 -0400")

"Chuck Ritter" <cfr100@psu.edu> writes:

> $ git clone ~dab143/src/OVER-REL/SOURCE-GIT-TEST OVER-REL
> Initialized empty Git repository in /home/cfr100/OVER-REL/.git/
> cpio: objects/pack/pack-80a0460fc07be5e0628b02549fdaa186b792d3f3.keep:
> Permission denied
> 888 blocks
>
> # cat pack-80a0460fc07be5e0628b02549fdaa186b792d3f3.keep
> fetch-pack 31620 on githost.arl.psu.edu
>
> Permission on the keep file are 600. Of course this looks like a stale
> lock of some sort.

The original repository you are cloning from is owned by somebody else,
and a file in it is not readable by you.  Bad.

No, .keep is not a stale lock.  It is active and valid --- do not
remove it --- it prevents the corresponding pack from being subject to
repacking.

The bug is that index-pack.c::final() tries to make the resulting pack and
idx readable with chmod(0444), but it forgets to make .keep readable.

To unblock you, you would need to ask the user "dab143" to make the
repository readable by you; the damage has already been done.  There may
be files other than that .keep file that is unreadable.

The following patch would prevent the breakage the repository you are
trying to clone from is suffering from happening again.

---

 index-pack.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/index-pack.c b/index-pack.c
index 9c0c278..9dc3cfd 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -720,6 +720,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
 				die("cannot write keep file");
 			report = "keep";
 		}
+		chmod(keep_name, 0444);
 	}
 
 	if (final_pack_name != curr_pack_name) {

  reply	other threads:[~2008-04-05 20:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-05 17:20 git clone error Chuck Ritter
2008-04-05 20:09 ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-28 12:57 Git " srinivasan.malligarjunan
2008-08-28 14:11 ` Andreas Ericsson
2007-07-31 23:45 Denis Bueno
2007-08-01  0:22 ` Junio C Hamano
2007-08-01  2:38 ` Linus Torvalds
2007-08-01 14:24   ` Denis Bueno
2007-08-01 16:19     ` Linus Torvalds
2007-08-01 16:36       ` Linus Torvalds
2007-08-01 17:17         ` Johannes Schindelin
2007-08-01 20:22           ` Denis Bueno
2007-08-01 21:12             ` Johannes Schindelin
2007-08-02 15:08               ` Denis Bueno
2007-08-02 17:08                 ` Johannes Schindelin
2007-08-02 17:40                   ` Linus Torvalds
2007-08-01 16:37       ` Steffen Prohaska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vabk8vzby.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=cfr100@psu.edu \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).