Something I always forget when setting up the post-receive hook for a new git repo

Catchy title for a blog post, huh?

Anyway, something I always (or almost always) forget to do every time when I set up a new git repo and set up the hook to send everyone an email on each `git push` is to edit `description` so the first email always starts “UNNAMED PROJECT” which drives me mad!

The full list of steps for setting this up I take are:

cd {git dir}/hooks
mv post-receive post-receive.bak
ln -s /usr/share/doc/git-core/contrib/hooks/post-receive-email post-receive
vi config # edit the config to give the hook an email address (see below)
vi description # *that* step – edit this to have your project name

The config should have something like this in it:

mailinglist =
emailprefix = “[URA git] ”

which will send it to a list you need to set up and give you something by which to filter the emails.

Later, gits!

[Update: that line linking to the post-receive-email script might be a bit Debian-specific, not sure…]

Amazon Web Services

I’m suddenly working with a few different AWS setups. I definitely like the flexibility and sheer scope of it. But that’s where its biggest problem comes from: the learning curve is considerable, just based on the massive number of services Amazon offer in AWS. Once up the curve, it’s actually all very simple to work with.

FWIW, I’m using a RightScale Debian AMI which Just Works. And lets me not have to change the chip on apt vs. yum and so on.

I have a feeling I’m going to posting more on the subject of AWS…

Adding extra IP addresses to Debian

I was just asked to add a new IP address to a Debian cloud host. It’s a simple thing, but depending on how often – or how seldom – you do it, you often still need to look it up to remind yourself. So, having previously decided to do a post every time I do something like this (for my own benefit as much as anything) here’s what I did…

Edit `/etc/network/interfaces` – obviously you’ll need to be root or `sudo` it.

There will probably something like this in there:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

The first chunk is the [loopback interface](, but the second chunk is the ethernet (`eth0`). The final line might be `dhcp` or it might be `static`, followed by more lines to describe the IP, like this:

iface eth0 inet static

To add a new IP – let’s imagine it’s ‘’ – to the same ethernet interface, just add something like this:

iface eth0:0 inet static

The “`:0`” is the extra bit we added. Then restart your networking:

/etc/init.d/networking restart

(keeping your fingers crossed you didn’t make any mistakes that might then lock you out of your host completely, of course ;)