Re: git-shell default working directory
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 26, 2020, 20:29 UTC
- Message-ID
- <xmqqeeuhhz3a.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20200226201121.GA287048@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> 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?