Re: Git Confusion
- From
Jeff King <peff@peff.net>
- Date
- May 29, 2009, 20:38 UTC
- Message-ID
- <20090529203854.GA14326@coredump.intra.peff.net>
- In-Reply-To
- <815c8c330905291324w4e861602n8278df72fdbc28db@mail.gmail.com>
On Fri, May 29, 2009 at 01:24:59PM -0700, Paul Tarjan wrote:
Show 7 quoted lines
> The reason I need http is slightly convoluted. The remote machine is > shared hosting with 1 ssh login that I don't want to give to my > partner AND I don't have root on that box. And as you correctly > guessed, that box doesn't have the git demon. The local machine where > he is doing his development. The only solution I saw without giving > him my username + pass to SSH was to do http cloning. Any better > solutions?
You can let him login via ssh key and restrict the actions of that key just to running git-upload-pack (which is what "git clone" and "git fetch" will invoke to clone or fetch commits). Something like:
command="git-upload-pack /path/to/repo" ssh-rsa ...
in your .ssh/authorized_keys file. Not that he still won't be able to actually push (which is maybe what you want).
For a more featureful solution (with permissions for pushing and pulling multiple repos), I think gitosis will do what you want (but I have never used it personally).
-Peff