@@ -21,25 +21,36 @@ And it must be accessible in your `$PATH`:
2121
2222## Configuration
2323
24- First, you will need to add a secret salt and secure passphrase to your git
25- configuration. The secret salt must be 16 ** hexidecimal** chacaters and the
26- secure passphrase can be any characters of any length:
24+ To quickly setup gitcrypt interactively, run ` gitcrypt init ` from the root
25+ of your git repository. It will ask you for a passphrase, cipher mode, and
26+ what files should be encrypted.
27+
28+ $ cd my-repo
29+ $ gitcrypt init
30+
31+ Your repository is now set up! Any time you ` git add ` a file that matches the
32+ filter pattern the ` clean ` filter is applied, automatically encrypting the file
33+ before it is staged. Using ` git diff ` will work normally, as it automatically
34+ decrypts file content as necessary.
35+
36+ ### Manual Configuration
37+
38+ First, you will need to add a secure passphrase to your git configuration:
2739
28- $ git config gitcrypt.salt 0000000000000000
2940 $ git config gitcrypt.pass my-secret-phrase
3041
31- * It is possible to set these options globally using ` git config --global ` , but
32- more secure to create a separate salt and passphrase for every repository.*
42+ * It is possible to set this options globally using ` git config --global ` , but
43+ more secure to create a separate passphrase for every repository.*
3344
34- A quick way to generate a new salt is:
45+ The default [ encryption cipher] [ 4 ] is ` aes-256-cbc ` , which should be suitable
46+ for almost everyone. However, it is also possible to use a different cipher:
3547
36- $ head -c 10 < /dev/random | md5 | cut -c-16
48+ $ git config gitcrypt.cipher aes-256-cbc
3749
38- ## Usage
50+ ** Do not use an ` ecb ` cipher unless you are 100% sure what you are doing! **
3951
40- For every repository that you want to use gitcrypt in, you will need a
41- [ .gitattributes] [ 4 ] file to define what files will be encrypted. Any file
42- [ pattern format] [ 5 ] can be used here.
52+ Next, you need to define what files will be automatically encrypted using the
53+ [ .gitattributes] [ 5 ] file. Any file [ pattern format] [ 6 ] can be used here.
4354
4455To encrypt all the files in the repo:
4556
@@ -73,12 +84,7 @@ Or if you prefer to manually edit `.git/config`:
7384 [diff "encrypt"]
7485 textconv = gitcrypt diff
7586
76- Your repository is now set up! Any time you ` git add ` a file that matches the
77- filter pattern the ` clean ` filter is applied, automatically encrypting the file
78- before it is staged. Using ` git diff ` will work normally, as it automatically
79- decrypts file content as necessary.
80-
81- ### Decryption and Clones
87+ ## Decrypting Clones
8288
8389To set up decryption from a clone, you will need to repeat most of these steps
8490on the other side.
@@ -93,9 +99,8 @@ Do not fear, this is actually what we want right now, because we need to setup
9399gitcrypt before doing a checkout. Now we just repeat the configuration as it
94100was done for the original repo.
95101
96- Second, set your encryption salt and passphrase:
102+ Second, set your encryption passphrase:
97103
98- $ git config gitcrypt.salt 0123456789abcdef
99104 $ git config gitcrypt.pass "gosh, i am so insecure!"
100105
101106Third, edit ` .gitattributes ` or ` .git/info/attributes ` :
@@ -125,7 +130,8 @@ you could [buy me a beer][wishes].
125130[ 1 ] : http://syncom.appspot.com/papers/git_encryption.txt " GIT transparent encryption "
126131[ 2 ] : http://syncom.appspot.com/
127132[ 3 ] : http://git.661346.n2.nabble.com/Transparently-encrypt-repository-contents-with-GPG-td2470145.html " Web discussion: Transparently encrypt repository contents with GPG "
128- [ 4 ] : http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
129- [ 5 ] : http://www.kernel.org/pub/software/scm/git/docs/gitignore.html#_pattern_format
133+ [ 4 ] : http://en.wikipedia.org/wiki/Cipher
134+ [ 5 ] : http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
135+ [ 6 ] : http://www.kernel.org/pub/software/scm/git/docs/gitignore.html#_pattern_format
130136
131137[ wishes ] : http://www.amazon.com/gp/registry/wishlist/1474H3P2204L8 " Woody Gilk's Wish List on Amazon.com "
0 commit comments