Git: how does git push handle an encrypted folder when "push"

318 Views Asked by At

Scenario: using git to push to a remote repo. Local and remote are regular git repos, not encrypted. Putting a possible ecryptfs filesystem within a folder within the repo to be pushed.

If: a git pre-hook would assure unmounting the folder(umount ~/encrypted_folder/), and echo to command line something like " the folder containing an encrypted ecrypfs file system was closed", then git would push the repo to it's remote location including the folder that contains the encrypted filesystem after having assured the folder was unmounted, so the encryption stands. To "umount" no password is asked for. No technical complications to regular git functionality to be observed.

What would be the undesirable consequences?

One is evident: version controlling an encrypted file or folder would be irrelevant. That is acceptable.

Second: instead of git being frugal, would every push write the whole of the encrypted folder to the remote, and bloat the remote repository?

Third: would git "corrupt" in any way the encrypted folder?

Incentive: copying a folder containing an encrypted ecryptfs filesystem is trivial, tarring also, using rsync or scp is the evident suggestion, excluding that folder from being inside the repo, using ".gitignore" also ...

but for workflow reasons: git being used for backup, disregarding the versioning of the folder that contains encrypted filesystem, not having to recourse to anything else and keep things user trivial. One single git push to multiple remote locations for now takes care of all desired data backup per user. For workflow reasons, per user, it would be nice to keep it that way.

White paper: one single backup blob, mostly versioned, and being able to have some encrypted data within the repo and it's remote clones. Prohibiting the folder concerned from being "open" by the git pre-hook. Everything in one single git operation. Ecryptfs contains within the encrypted part of the data, anything needed to "open and close" the data but the passphrase. This would make for high mobility, needing to clone the remote repo to any git-ecryptfs enabled device, in any remote location and have access to the encrypted data.

0

There are 0 best solutions below