git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Andrei Rybak <rybak.a.v@gmail.com>,
	Greg Anders <greg@gpanders.com>,
	git@vger.kernel.org
Subject: Re: git-shell default working directory
Date: Wed, 26 Feb 2020 15:39:31 -0500	[thread overview]
Message-ID: <20200226203931.GA288832@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqeeuhhz3a.fsf@gitster-ct.c.googlers.com>

On Wed, Feb 26, 2020 at 12:29:13PM -0800, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > On Wed, Feb 26, 2020 at 10:10:05AM +0100, Andrei Rybak wrote:
> >
> >> > I've not yet found a way to get this to work without keeping the
> >> > repositories in the git user's home folder.
> >> 
> >> Disclaimer: I'm not at all familiar with git server setup. Would it make sense
> >> to change git user home directory to be the required dedicated directory?
> >
> > Yeah, that's what I would suggest. git-shell does explicitly cd to
> > $HOME, so any chdir you do before then will be lost (though you could
> > perhaps just set $HOME in ~/.ssh/rc).
> 
> I didn't suggest it because the original request did not sound like
> building a dedicated machine that is used only to push into without
> interactive shell access.  If $HOME is moved to such a git centric
> place, that would make it almost impossible to use the account for
> shell interactive access, I would imagine, and if that is acceptable,
> perhaps something like gitolite would fit the bill better?

I took the mention of /home/git to mean it was a dedicated "git" user.
But yeah, that would be an awful suggestion for a regular user. :)

And I second the notion of gitolite for a dedicated setup like this (I
haven't really used it much myself, but the design always seemed quite
sane to me).

I _do_ keep git repositories on a host accessible by my normal user.
It's a mild inconvenience to have to clone "git.peff.net:git/foo.git"
instead of just "git.peff.net:foo.git". We could allow a config or
environment variable to re-root a relative path given to upload-pack. As
long as it was clear this isn't a security feature (it's for people who
already have shell access, and could be overridden by an absolute path),
I think it would be OK.

-Peff

  reply	other threads:[~2020-02-26 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  0:48 git-shell default working directory Greg Anders
2020-02-26  9:10 ` Andrei Rybak
2020-02-26 20:11   ` Jeff King
2020-02-26 20:29     ` Junio C Hamano
2020-02-26 20:39       ` Jeff King [this message]
2020-02-27 21:57         ` Greg Anders
2020-02-28 20:40           ` Greg Anders

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20200226203931.GA288832@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=greg@gpanders.com \
    --cc=rybak.a.v@gmail.com \
    /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.
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).