Re: git + ssh + key authentication feature-request
From: Mark Wooding <hidden>
Date: 2016-06-15 22:42:18
Junio C Hamano [off-list ref] wrote:
Correct modulo s/git-daemon/git-shell/.
D'oh! Finger trouble!
Now, you brought up an interesting way to do this without using unix uid. Some sshd installations do not honour environment= settings, but that problem aside, you could define a token, say GIT_USER, with different value on each line in the shared authorized_keys file so that you can distinguish incoming developers that share the same "home directory", and change the example hook Carl gave us to use that token instead of the unix user identity. I'd imagine that would work quite well.
Quite possibly. Don't give me the credit here, by the way. I completely stole this whole idea from the Subversion documentation: see `SSH configuration tricks' in http://svnbook.red-bean.com/nightly/en/svn.serverconfig.svnserve.html at the bottom. Oh, any my mistake: the `environment...' options go at the beginning of an authorized_keys line, not at the end. It's so time I went to sleep. -- [mdw]