diff --git a/README.md b/README.md index 945735c..86b2671 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,11 @@ Configure a repository to use git-crypt: Specify files to encrypt by creating a .gitattributes file: - secretfile filter=git-crypt diff=git-crypt - *.key filter=git-crypt diff=git-crypt - secretdir/** filter=git-crypt diff=git-crypt + secretfile eol=lf filter=git-crypt diff=git-crypt + *.key eol=lf filter=git-crypt diff=git-crypt + secretdir/** eol=lf filter=git-crypt diff=git-crypt + +***eol=lf settings is necessary if autocrlf is true.*** Like a .gitignore file, it can match wildcards and should be checked into the repository. See below for more information about .gitattributes. @@ -40,6 +42,9 @@ Make sure you don't accidentally encrypt the .gitattributes file itself .gitattributes rules are in place *before* you add sensitive files, or those files won't be encrypted! +***IF `core.autocrlf` is true (which is recommended in Windows), it will throw an error like `git-crypt: error: encrypted file has been tampered with!` +To avoid this, use `eol=lf` in .gitattributes for the secrets.*** + Share the repository with others (or with yourself) using GPG: git-crypt add-gpg-user USER_ID