git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-daemon shallow checkout fail
@ 2017-01-29  0:29 Bob Proulx
  2017-01-30 16:52 ` Johannes Schindelin
  2017-01-30 17:27 ` Jeff King
  0 siblings, 2 replies; 9+ messages in thread
From: Bob Proulx @ 2017-01-29  0:29 UTC (permalink / raw)
  To: git

I am trying to understand a problem with shallow checkouts through the
git-daemon.  The server side fails trying to create a shallow_XXXXXX
file in the repository.  But of course it can't due to no permissions
from the git-daemon user.

However the problem driving me crazy is that this only fails this way
on one machine.  Unfortunately failing on the machine I need to use.
If I try this same setup on any other machine I try then there is no
failure and it works okay.  Therefore I conclude that in the failing
case it is trying to write a shallow_XXXXXX file in the repository but
in all of the passing cases it does not.  I browsed through the
git-daemon source but couldn't deduce the flow yet.

Does anyone know why one system would try to create shallow_XXXXXX
files in the repository while another one would not?

Trying to be unambiguous here is my test case:

  mkdir /run/git
  chmod 755 /run/git
  chown nobody:root /run/git
  cd /run/git && env -i HOME=/run/git PATH=/usr/local/bin:/usr/bin:/bin su -s /bin/sh -c "git-daemon --export-all --base-path=/srv/git --verbose" nobody
  [18340] Ready to rumble

That sets up the test case.  Have any bare git repository in /srv/git
for use for cloning.

  git clone --depth 1 git://localhost/test-project.git
  Cloning into 'test-project'...
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed

And the server side says:

  [26071] Request upload-pack for '/test-project.git'
  [26071] fatal: Unable to create temporary file '/srv/git/test-project.git/shallow_xKwnvZ': Permission denied
  [26055] [26071] Disconnected (with error)

Of course git-daemon running as nobody can't create a temporary file
shallow_XXXXXX in the /srv/git/test-project.git because it has no
permissions by design.  But why does this work on other systems and
not work on my target system?

  git --version  # from today's git clone build
  git version 2.11.0.485.g4e59582

Thanks!
Bob

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-02-07 22:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-29  0:29 git-daemon shallow checkout fail Bob Proulx
2017-01-30 16:52 ` Johannes Schindelin
2017-02-07  0:27   ` Bob Proulx
2017-01-30 17:27 ` Jeff King
2017-02-02  9:26   ` Duy Nguyen
2017-02-07  0:27     ` Bob Proulx
2017-02-07  0:56       ` Bob Proulx
2017-02-07 11:07         ` Duy Nguyen
2017-02-07 22:49           ` Bob Proulx

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).