I would like to set a remote git repo that I will be pushing to regulary, which is easy to do. But I want to set up this remote repo to be on a LUKS (Linux Unified Key Setup) formatted drive (via cryptsetup
) and I would like this drive to be encrypted at all times except when it is ready to accept the git pushes.
The disk will be connected at all times but I want it to be mounted and ready as a disk and dismounted when the pushing is done. Naturally I would have SSH access and the passwords.
I want this to be automated. I can manually login and mount the drive then unmount it but I do not want go through this multiple times a day and I want it to be as secure as possible, like not saving my passwords/pass files etc… on the remote PC.
What is the proper way to achieve this? Is this even doable?