Debian/Ubuntu setup etckeeper

apt-get install git etckeeper
sed -i 's/#VCS="git"/VCS="git"/' /etc/etckeeper/etckeeper.conf
sed -i 's/VCS="bzr"/#VCS="bzr"/' /etc/etckeeper/etckeeper.conf
sed -i 's/PUSH_REMOTE=""/PUSH_REMOTE="origin"/' /etc/etckeeper/etckeeper.conf

cat <<EOF > /etc/etckeeper/post-install.d/99git-gc
#!/usr/bin/env sh
exec git gc
EOF

chmod +x /etc/etckeeper/post-install.d/99git-gc

cat  <<EOF > ~/.ssh/config
Host etckeeper
HostName *YOUR GIT-SERVER HERE*
IdentityFile /etc/ssl/private/etckeeper.key
EOF

cat <<EOF > /etc/ssl/private/etckeeper.key
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
EOF

chmod 600 /etc/ssl/private/etckeeper.key

cd /etc/
etckeeper init
git remote add origin git@etckeeper:*REPO/PATH*.git
etckeeper commit Initial