github.com/StackExchange/blackbox/v2@v2.0.1-0.20220331193400-d84e904973ab/docs/enable-repo.md (about) 1 Enabling Blackbox on a Repo 2 =========================== 3 4 Overview: 5 1. Run the initialization command 6 2. Add at least one admin. 7 3. Add files. (don't add files before the admins) 8 9 The long version: 10 11 1. If you don't have a GPG key, set it up using instructions such as: 12 [Set up GPG key](https://help.github.com/articles/generating-a-new-gpg-key/). \ 13 Now you are ready to go. 14 15 1. `cd` into a Git, Mercurial, Subversion or Perforce repository and run `blackbox init`. 16 17 1. Add yourself with `blackbox admin add YOUR@EMAIL` 18 19 1. Commit the files as directed. 20 21 That's it! 22 23 At this point you should encrypt a file and make sure you can decrypt 24 it. This verifies that everything is working as expected. 25 26 27 1. Pick a file to be encrypted. Since this is a test, you might want 28 to create a test file. Call it `secret.txt` and edit the file 29 so that it includes your mother's maiden name. Just kidding! 30 Store this sentence: `This is my test file.` 31 32 2. Run `blackbox file add secret.txt` 33 34 3. Decode the encrypted version: `blackbox cat secret.txt` 35 36 The "cat" subcommand only accesses the encrypted (`.gpg`) file and is 37 a good way to see that the file was encrypted properly. You should 38 see `This is my test file.` 39 40 4 Verify that editing the file works. 41 42 To view and/or edit a file, run `blackbox edit --shred secret.txt` 43 44 Now encrypt it and shred the original: 45 46 ``` 47 blackbox encrypt --shred secret.txt 48 ``` 49 50 Now make sure you can decrypt the new file: 51 52 ``` 53 blackbox cat secret.txt 54 ``` 55 56 You should see the changed text. 57 58 Now commit and push `secret.txt.gpg` and you are done!