succesfull use of git-shell

From: Alan Chandler <alan@chandlerfamily.org.uk>
Date: 2005-11-10 08:52:07
I just wanted to give a heads-up on a successful set up and push to a 
repository where the account accessing the repository runs git-shell.

It turned out to be extremely simple to do - but the documentation that I 
could find is so terse in places that I wasn't sure it was going to work 
until I tried it.  Two main issues.

1) the man page for git-push describes <repository> as

remote.machine:/path/to/repo.git/

the tutorial isn't much help either as it says

git push <public-host>:/path/to/my-git.git master

whereas I knew I wanted to access an account that was different from mine

2) the directory paths are always specified as absolute in the documentation, 
but (particularly if you are going to set up a public repository which 
several people may be pushing to) its helpful not to know exactly which path 
on the server the repository exists.


In my setup I did the following simple things 

1) created an account called git with a home directory at /var/lib/git and a 
shell of /usr/local/bin/git-shell (you can see where my git is installed) on 
my server (called roo.home)

2) created a an empty repository at /var/lib/git/famtree.git 

a) Logged in as root into the machine that was the server
b) Became a git user with 

su -s /bin/bash git

(You can't do a normal su git because the default shell immediately throws you 
straight out again)
c) mkdir famtree.git; GIT_DIR=famtree.git git-init-db
d) chmod +x famtree.git/hooks/post-update
(planning to allow http anonymous access)

3) back on my development machine - pushed the master branch of my current 
repository out to the new one just created with

git-push git@roo.home:famtree.git

It is this last simple command line that I _really_ like.  If I wanted to set 
up some form of centralised development with multiple access to the 
repository, I only have to append the public keys of those people into the 
authorized_keys file on that account on the server and I am done.



 

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Nov 10 08:54:48 2005

This archive was generated by hypermail 2.1.8 : 2005-11-10 08:54:53 EST