git-crypt
git-crypt copied to clipboard
Unlock is failing under Windows and Linux (smudge filter failed).
I installed the official version released (git-crypt-0.7.0-x86_64.exe) for Windows and tried to unlock my repository. It seems it fails with some files. Possible encoding problem? This repo is being used successfully in Unix envs.
PS C:\Users\Edu\Documents\GitHub\zettelkasten> git-crypt-0.7.0-x86_64.exe unlock
git-crypt: error: encrypted file has been tampered with!
error: external filter '"C:\\Program Files\\git-crypt\\git-crypt-0.7.0-x86_64.exe" smudge' failed 1
error: external filter '"C:\\Program Files\\git-crypt\\git-crypt-0.7.0-x86_64.exe" smudge' failed
fatal: Company/secrets/git/README.md: smudge filter git-crypt failed
Error: 'git checkout' failed
git-crypt has been set up but existing encrypted files have not been decrypted
The same error is happening in Ubuntu Linux.
After the 'unlock' everything stop working.
I cannot commit/stash/revert and I can't even lock it again because the pending file (showing in the fatal error line) needs to be solved.
I have the same issue but only in Windows, it works fine in my Ubuntu 20.04 WSL2
I figured it out. It is because of CRLF. It is easy to workaround this issue.
the secret file has to be LF use
eol=lf filter=git-crypt diff=git-crypt to ensure it doesn't get converted to CRLF in Windows
I just wanted to share that I spent quite a few hours debugging this issue.