Re: git clone error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Chuck Ritter" <cfr100@xxxxxxx> 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) {
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux