From 283110926292cdad26414776646bb045645ac924 Mon Sep 17 00:00:00 2001 From: Sam Lin Date: Wed, 21 Dec 2022 18:02:09 -0600 Subject: [PATCH 1/4] Update Readme with workaround for Windows --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 945735c..dafe1ff 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ 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 Like a .gitignore file, it can match wildcards and should be checked into the repository. See below for more information about .gitattributes. @@ -40,6 +40,8 @@ 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! +***For Windows, Eol of the files needs to be LF instead of CRLF, or it will throw error like `git-crypt: error: encrypted file has been tampered with!` + Share the repository with others (or with yourself) using GPG: git-crypt add-gpg-user USER_ID From 6eb3df6ea17d19b640314755354013872c67116f Mon Sep 17 00:00:00 2001 From: Sam Lin Date: Thu, 22 Dec 2022 09:22:14 -0600 Subject: [PATCH 2/4] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dafe1ff..9c04a09 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ Specify files to encrypt by creating a .gitattributes file: *.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. Make sure you don't accidentally encrypt the .gitattributes file itself @@ -40,7 +42,8 @@ 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! -***For Windows, Eol of the files needs to be LF instead of CRLF, or it will throw error like `git-crypt: error: encrypted file has been tampered with!` +***IF `core.autocrlf` is true (which is recommended in Windows), it will throw 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: From d03b5cb73d45534b045936d99eceacadc490c038 Mon Sep 17 00:00:00 2001 From: Sam Lin Date: Thu, 22 Dec 2022 09:23:07 -0600 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c04a09..102c0bb 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ 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 error like `git-crypt: error: encrypted file has been tampered with!` +***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: From c60532d23766de4729eab0c6d0a10355ef3c5270 Mon Sep 17 00:00:00 2001 From: Sam Lin Date: Thu, 22 Dec 2022 10:11:19 -0600 Subject: [PATCH 4/4] fix formating --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 102c0bb..86b2671 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Specify files to encrypt by creating a .gitattributes file: *.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. +***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. @@ -43,7 +43,7 @@ Make sure you don't accidentally encrypt the .gitattributes file itself 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. +To avoid this, use `eol=lf` in .gitattributes for the secrets.*** Share the repository with others (or with yourself) using GPG: