Encrypt git repository on server (safe against theft of physical hardware)

You could use an ecrypted home directory. You would have to login and manually mount the encrypted drive and provide the decryption key when the server reboots. You can't have the drive automatically mounted for obvious reasons.


You could use a smudge/clean filter to encrypt the contents of the repository on the remote filesystem: https://gist.github.com/873637


You could use git-remote-gcrypt to git push and git fetch from the client computers to the server (or anywhere else). Not just the contents but the names of the files and other (all?) repository metadata is encrypted as well.