Today I added support for development of za3k.com using git:
env -i git pull
echo "Deployed za3k.com"
and markdown support, via a cgi markdown wrapper someone wrote for apache (yes, I’m still using Apache).
Edit: I ended up wanting support for tables in markdown, so I used Ruby‘s redcarpet markdown gem (the same thing Github uses, supports this style of tables as well as code blocks).
CGI support via http://blog.tonns.org/2013/10/enabling-markdown-on-your-apache.html
GitHub-Backup is a small project to archive github repos to a local computer. It advertises that one reason to use it is
You are paranoid tinfoil-hat wearer who needs to back up everything in triplicate on a variety of outdated tape media.
which describes why I was searching it out perfectly.
I made a new account on my server (github) and cloned their repo.
sudo useradd -m github
sudo -i- u github
git clone email@example.com:clockfort/GitHub-Backup.git
Despite being semi-unmaintained, everything mostly works still. There were two exceptions–some major design problems around private repos. I only need to back up my public repos really, so I ‘solved’ this by issuing an Oauth token that only knows about public repos. And second, a small patch to work around a bug with User objects in the underlying Github egg:
￼- os.system("git config --local gitweb.owner %s"%(shell_escape("%s <%s>"%(repo.user.name, repo.user.email.encode("utf-8"))),))
+ if hasattr(repo.user, 'email') and repo.user.email:
+ os.system("git config --local gitweb.owner %s"%(shell_escape("%s <%s>"%(repo.user.name, repo.user.email.encode("utf-8"))),))
Then I just shoved everything into a cron task and we’re good to go.
@hourly GitHub-Backup/github-backup.py -m -t vanceza /home/github/vanceza
Edit: There’s a similar project for bitbucket I haven’t tried out: https://bitbucket.org/fboender/bbcloner