git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Read-only access to an "objects/info/alternates" repository

From
SMStefan Monnier <monnier@iro.umontreal.ca>
Date
Dec 25, 2020, 21:47 UTC
Message-ID
<jwvmty1pnm9.fsf-monnier+emacs@gnu.org>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
I did basically:
    git clone --reference ~otheruser/nongnu
    [ Days passed and I did various things.  ]
    cd nongnu; git gc

Note that `otheruser` is [..wait for it..] another user, so I only have read access to the referenced repository.

What did you expect to happen? (Expected behavior)

That it would GC the local part of the repository and that it wouldn't try to modify the referenced repository.

What happened instead? (Actual behavior)

I got warnings indicating that Git was trying to delete files from the referenced repository:

    Enumerating objects: 35095, done.
    Nothing new to pack.
    warning: unable to unlink '/home/otheruser/nongnu/.git/objects/pack/pack-0d85e74ac2f7e51ce26f281e64eb738e8182fa95.idx': Permission denied
    warning: unable to unlink '/home/otheruser/nongnu/.git/objects/pack/pack-5fe14feff49ccdee5469af9dc94f6784e8464a6b.idx': Permission denied
What's different between what you expected and what actually happened?
The warnings.
Anything else you want to add:

The warnings make me wonder if I should worry about other possible misbehaviors when using such a setup.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.29.2 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 compiler info: gnuc: 10.2 libc info: glibc: 2.28 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]
Message 1 of 1 in “Read-only access to an "objects/info/alternates" repository”
  1. Stefan MonnierDec 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.