AGWA / git-crypt

Transparent file encryption in git
https://www.agwa.name/projects/git-crypt/
GNU General Public License v3.0
8.1k stars 472 forks source link

Git-crypt doesn't decrypt #282

Closed Crims-on closed 1 year ago

Crims-on commented 1 year ago

I tried cloning my github repo with a configuration to encrypt all files and when I check if the files are encrypted using git-crypt status it says that none of the files are encrypted even though they clearly are with a git-crypt signature in the file. git-crypt unlock ../key adds the key to the keys directory but doesn't decrypt any files and when running git-crypt status again it says the same thing. I get no errors or anything so I don't know what is wrong

This problem is occuring on windows with version 0.7.0 prebuilt

Crims-on commented 1 year ago

I tried on my main system now and I get the same result. git-crypt lock works but not git-crypt unlock

alerque commented 1 year ago

with a configuration to encrypt all files

How exactly did you configure this? It sounds like you might have configured your repository to encrypt the git-crypt tracked files as well as your own, hence leaving nothing readable to git-crypt unlock. You need to only encrypt your content files in the repo, not wildcard the whole thing.

Crims-on commented 1 year ago

Oh that's it I guess. Do I have to set individual match for each filetype? Rn i have /. and // I think it was

alerque commented 1 year ago

You can use the usual Git attribute file operators such as negation. You can potentially include wildcards like you have, but then carefully exclude all the files used by git-crypt itself.

I do think your use case is somewhat outside the design scope of this program though. There are other solutions for fully encrypted repository data that might serve you better, there are relatively few solutions for including some encrypted data inside otherwise unencrypted repositories and for that I think git-crypt is still one of the best.