File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
railties/lib/rails/commands/encrypted Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ === Storing Encrypted Files in Source Control
2
+
3
+ The Rails `encrypted` commands provide access to encrypted files.
4
+
5
+ === Editing Files
6
+
7
+ `rails encrypted:edit config/encrypted_file.yml.enc` opens a temporary file
8
+ in `$EDITOR` with the decrypted contents of `config/encrypted_file.yml.enc` to
9
+ edit. The encrypted key is either stored in `config/master.key`
10
+ or `ENV["RAILS_MASTER_KEY"]` is used, but you can provide relative path
11
+ to the encryption key by using `--key` option:
12
+
13
+ `rails encrypted:edit config/encrypted_file.yml.enc --key config/encrypted_file.key`.
14
+
15
+ === Viewing files
16
+
17
+ `rails encrypted:show config/encrypted_file.yml.enc` prints the decrypted contents of
18
+ `config/encrypted_file.yml.enc` file. The encrypted key is either stored in `config/master.key`
19
+ or `ENV["RAILS_MASTER_KEY"]` is used, but you can provide relative path
20
+ to the encryption key by using `--key` option:
21
+
22
+ `rails encrypted:show config/encrypted_file.yml.enc --key config/encrypted_file.key`.
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class EncryptedCommand < Rails::Command::Base # :nodoc:
16
16
def help
17
17
say "Usage:\n #{ self . class . banner } "
18
18
say ""
19
+ say self . class . desc
19
20
end
20
21
end
21
22
You can’t perform that action at this time.
0 commit comments