{"thread":{"id":"2415","subject":"succesfull use of git-shell","startedAt":"2005-11-09T21:52:07Z","lastAt":"2005-11-09T22:00:17Z","messageCount":2,"participants":["Alan Chandler"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11408","messageId":"200511092152.07195.alan@chandlerfamily.org.uk","threadId":"2415","inReplyTo":null,"subject":"succesfull use of git-shell","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-09T21:52:07Z","receivedAt":"2005-11-09T21:52:07Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"I just wanted to give a heads-up on a successful set up and push to a \nrepository where the account accessing the repository runs git-shell.\n\nIt turned out to be extremely simple to do - but the documentation that I \ncould find is so terse in places that I wasn't sure it was going to work \nuntil I tried it.  Two main issues.\n\n1) the man page for git-push describes <repository> as\n\nremote.machine:/path/to/repo.git/\n\nthe tutorial isn't much help either as it says\n\ngit push <public-host>:/path/to/my-git.git master\n\nwhereas I knew I wanted to access an account that was different from mine\n\n2) the directory paths are always specified as absolute in the documentation, \nbut (particularly if you are going to set up a public repository which \nseveral people may be pushing to) its helpful not to know exactly which path \non the server the repository exists.\n\n\nIn my setup I did the following simple things \n\n1) created an account called git with a home directory at /var/lib/git and a \nshell of /usr/local/bin/git-shell (you can see where my git is installed) on \nmy server (called roo.home)\n\n2) created a an empty repository at /var/lib/git/famtree.git \n\na) Logged in as root into the machine that was the server\nb) Became a git user with \n\nsu -s /bin/bash git\n\n(You can't do a normal su git because the default shell immediately throws you \nstraight out again)\nc) mkdir famtree.git; GIT_DIR=famtree.git git-init-db\nd) chmod +x famtree.git/hooks/post-update\n(planning to allow http anonymous access)\n\n3) back on my development machine - pushed the master branch of my current \nrepository out to the new one just created with\n\ngit-push git@roo.home:famtree.git\n\nIt is this last simple command line that I _really_ like.  If I wanted to set \nup some form of centralised development with multiple access to the \nrepository, I only have to append the public keys of those people into the \nauthorized_keys file on that account on the server and I am done.\n\n\n\n \n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"},{"id":"11410","messageId":"200511092200.17334.alan@chandlerfamily.org.uk","threadId":"2415","inReplyTo":"200511092152.07195.alan@chandlerfamily.org.uk","subject":"Re: succesfull use of git-shell","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-09T22:00:17Z","receivedAt":"2005-11-09T22:00:17Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Wednesday 09 Nov 2005 21:52, Alan Chandler wrote:\n\n> git-push git@roo.home:famtree.git\n\nWhoops: missed off master of the end of that line (although do you need it?)\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"}]}