I’m switching all my personal projects to git from Subversion. After watching the Peepcode git screencast, Subversion feels oh-so-2002 and I can’t wait to bury it forever.
First we have to get git running on my Ubuntu server. I tried
sudo apt-get install git-core #do not do this!
but that led to trouble down the line. Better to just fetch the source and build from that:
sudo apt-get install libexpat1-dev zlibc curl gettext
cd ~/src
wget http://www.kernel.org/pub/software/scm/git/git-1.5.4.rc2.tar.gz
cd git-1.5.4.rc2
make prefix=/usr/local all
sudo make prefix=/usr/local install
Then, following the excellent instructions on scie.nti.st, we grab the gitosis code:
cd ~/src
git clone git://eagain.net/gitosis.git
Then:
cd gitosis
sudo apt-get install python-setuptools
python setup.py install
Next we have to create a git user to own the repositories:
sudo adduser \
--system \
--shell /bin/sh \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
We copy my public ssh key into /tmp/id_rsa.pub, then run
sudo -H -u git gitosis-init < /tmp/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
And that’s the end of the server-side setup! On the local machine, we check out the files that are needed to control the server. First we have to account for the fact that I run SSH on a nonstandard port: edit ~/.ssh/config and put this inside:
Host www.example.com
Port 32767
Then you can do:
git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git
cd gitosis-admin
This is the directory where you administer gitosis.
A look into it's source and I couldn't sleep for a week, because of the nightmares. Overhyped piece of shit, apparently.
But all the cool kids are using it, so you shouldn't miss it. How would using subversion, cvs, darcs look in oh-so-2008? What would your fun friends would say? How could you socialize with them?
They would cast you out and hate you until the end of time.
You are a fucking hypemonger, go and diaf. You would save the world a lot of trouble.
Anonymous, maybe you're easily intimidated. Git works very well, even if you don't like looking at bash code. If you actually like branching and merging in Subversion, you must like pain.
Nice one. :)
Any comments on setting up a windows client?
You would think that your typical Youtube commenter wouldn't stray from their home site, but then here comes Anon 17:46. "Go and diaf"? In response to some instructions on how to set up a freakin' SCM program? Grow up and look into some anger management therapy. You sound ignorant and unstable.
That said... thank you very much for writing this up. It worked well for me except for about 6 other packages that I hadn't already installed on the very-barebones system I was working on. Once I got those dependencies taken care of, all was well.
Thanks!
I used these instructions to install with git 1.5.6 - don't forget to run ./configure before the make, make install of the git compilation process and make sure /usr/local/bin is in your path.
Thanks for the instructions :-)
roulette strategy
link: wow gold | wow power leveling | wow gold
Thanks for the instructions, very helpful.
I second Wayne, one should run ./configure before the make
Just to reiterate:
git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git
is run on your LOCAL workstation, not on the remote gitosis hosting server as some tutorials suggest.
If the git clone command asks you for a password be sure to
sudo tail -f /etc/log/auth.log
on your remote server and if it complains about the git user not being in AllowUsers, remove the AllowUsers from your /etc/ssh/sshd_config or add the git user to AllowUsers. Only the former worked for me but YMMV.
Of course it should be
sudo tail -f /var/log/auth.log
Post new comment