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
Copy file name to clipboardExpand all lines: README.md
+28-21Lines changed: 28 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,23 +138,26 @@ This will show the raw content as stored in the repository. So even if `cat my-s
138
138
139
139
### Unlock a repository
140
140
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:
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). Recommended on CI.
145
-
export GIT_SECRETS_KEY="YOUR_BASE64_KEY"
146
-
git-conceal unlock env:GIT_SECRETS_KEY
147
-
148
-
# Option 2: Provide the Base64-encoded key as command line argument. (Only use locally, as on CI this could leak the key in logs).
# Option 2: Provide the key via an environment variable (base64 encoded), by using the `env:` prefix.
150
+
# Recommended on CI, where secret values like the key are usually exposed to jobs as env vars.
151
+
# Prefer this over `git-conceal unlock $GIT_CONCEAL_SECRET_KEY` to reduce the risk of accidentally leaking
152
+
# the key e.g. in CI logs (which might resolve `$VAR` env vars before printing the resolved command in logs)
153
+
$ git-conceal unlock env:GIT_CONCEAL_SECRET_KEY
154
+
155
+
# Option 3: Provide it via stdin (expects raw binary, 32 bytes as input)
156
+
# For example, if you have the binary key in a file (which you would hopefully have protected properly!)
157
+
$ git-conceal unlock - </path/to/keyfile.bin
158
+
# Or if you have the base64-encoded key in your clipboard, you could do:
159
+
$ pbpaste | base64 -d | git-conceal unlock -
160
+
# (Though in that case `git-conceal unlock $(pbpaste)` would achieve the same thing)
158
161
```
159
162
160
163
This will:
@@ -186,7 +189,7 @@ git-conceal status
186
189
This shows:
187
190
- Whether the repository is locked or unlocked
188
191
- Whether filters are configured
189
-
- Which file patterns are encrypted (from`.gitattributes`)
192
+
- Which files are handled by `git-conceal` (i.e. tracked files matching one of the patterns with `filter=git-conceal` in your`.gitattributes`)
190
193
191
194
```bash
192
195
git-conceal status <FILES>
@@ -205,7 +208,7 @@ git-conceal key show
205
208
### Rotate the encryption key
206
209
207
210
There are times when you might need to rotate the encryption key used in an encrypted repository.
208
-
For example, in the unfortunate even of the key leaking or when a coworker leaves your team/company and you want to ensure they can't access new secrets.
211
+
For example, in the unfortunate event of the key leaking, or when a coworker leaves your team/company and you want to ensure they can't access new secrets.
209
212
210
213
You can rotate the encryption key with:
211
214
@@ -245,15 +248,19 @@ For detailed security information, including key management, deterministic encry
245
248
246
249
## New releases
247
250
248
-
Releases are automated by our CI every time we make a `git tag` on the repo. Be sure to update the version in the `Cargo.toml` first though.
251
+
Releases are automated by our CI every time we make a `git tag` on the repo.
252
+
253
+
<details><summary>Release instructions for maintainers</summary>
249
254
250
255
- Create a `release/x.y.z` branch
251
256
- Edit `Cargo.toml` to update the `version = "x.y.z"` field
252
-
- Run `cargo check` to update the `Cargo.lock` and validate the code still compiles
257
+
- Run `cargo check` to update the `Cargo.lock`with the new version and validate the code still compiles
253
258
-`git add Cargo.toml Cargo.lock` then `git commit -m "Bump version to x.y.z"`
254
-
- Create a PR and get it merged
259
+
- Create a PR with those changes and get it merged into `trunk`
255
260
- Once it has landed in `trunk`, push a new tag (`git tag "x.y.z"` then `git push origin "x.y.z"`)
256
-
- Then let the CI build the release binaries for all platforms, create the GitHub Release, and attach the compiled binaries as assets.
261
+
262
+
The CI will trigger on the Git tag and take care of building the release binaries for all platforms and creating the GitHub Release with those binaries attached as assets.
0 commit comments