You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove the syntax that was allowing to provide the key from a file.
- Make the default syntax be for passing the key as base64 directly as argument (without requiring the `base64:` prefix for that case anymore.
Rationale:
It was never a good idea to provide a built-in way to read the binary key from a file IMHO, because that would suggest that having the key laying around in a random file on disk was a good idea to begin with (which can be OK… as long as the key file is properly protected). For example, we wouldn't want to incite people to write the key in a file just to be able to `git-conceal unlock` with it… and then accidentally commit that key file.
Reading from a file is still possible using `-` as the argument to read from `stdin`, then using shell redirection syntax `<file` to feed the content of the file as stdin. So even in the unlikely case that someone would want to provide the key via a file, they can still do that.
And since having the base64 key directly will be the most common use case for `unlock` on local machines (when developers get the key from the secret store and copy/paste it to the `unlock` command), that feels more fitting for this to be the default command / most basic syntax (i.e. without requiring a `base64:` prefix for it)
Copy file name to clipboardExpand all lines: README.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,24 +141,23 @@ This will show the raw content as stored in the repository. So even if `cat my-s
141
141
After you freshly clone a repository which contains files which have been encrypted by `git-conceal`, you need to provide the symmetric key that your coworkers would have shared with you to decrypt it:
142
142
143
143
```bash
144
-
# Option 1: Provide the key via an environment variable (base64 encoded).
145
-
# Recommended on CI, where secret values like the key are usually exposed to jobs as env vars.
146
-
$ git-conceal unlock env:GIT_CONCEAL_SECRET_KEY
147
-
148
-
# Option 2: Provide the Base64-encoded key as command line argument.
144
+
# Option 1: Provide the Base64-encoded key directly as command line argument.
149
145
# Only use locally, as on CI this could leak the key in logs.
150
146
# Tip: start your command with a space to avoid it (and thus the key) being added to your shell's history
0 commit comments