@@ -51,13 +51,6 @@ Or whatever variation of the above fits your system and shell.
5151To use ** SOPS** as a library, take a look at the [ decrypt
5252package] ( https://pkg.go.dev/github.com/getsops/sops/v3/decrypt ) .
5353
54- ::: sectnum
55- :::
56-
57- ::: contents
58- Table of Contents
59- :::
60-
6154# Usage
6255
6356For a quick presentation of SOPS, check out this Youtube tutorial:
@@ -196,10 +189,12 @@ environment variable as a comma separated list. The default order is
196189If you want to test ** SOPS** without having to do a bunch of setup, you
197190can use the example files and pgp key provided with the repository:
198191
199- $ git clone https://github.com/getsops/sops.git
200- $ cd sops
201- $ gpg --import pgp/sops_functional_tests_key.asc
202- $ sops edit example.yaml
192+ ` ` ` sh
193+ $ git clone https://github.com/getsops/sops.git
194+ $ cd sops
195+ $ gpg --import pgp/sops_functional_tests_key.asc
196+ $ sops edit example.yaml
197+ ` ` `
203198
204199This last step will decrypt ` example.yaml` using the test private key.
205200
@@ -304,11 +299,15 @@ projects/my-project/locations/global/keyRings/sops/cryptoKeys/sops-key ENCRYPT_D
304299
305300Now you can encrypt a file using:
306301
307- $ sops encrypt --gcp-kms projects/my-project/locations/global/keyRings/sops/cryptoKeys/sops-key test.yaml > test.enc.yaml
302+ ``` sh
303+ $ sops encrypt --gcp-kms projects/my-project/locations/global/keyRings/sops/cryptoKeys/sops-key test.yaml > test.enc.yaml
304+ ```
308305
309306And decrypt it using:
310307
311- $ sops decrypt test.enc.yaml
308+ ``` sh
309+ $ sops decrypt test.enc.yaml
310+ ```
312311
313312## Encrypting using Azure Key Vault
314313
@@ -358,7 +357,9 @@ is the client secret.
358357Encrypting/decrypting with Azure Key Vault requires the resource
359358identifier for a key. This has the following form:
360359
361- https://${VAULT_URL}/keys/${KEY_NAME}/${KEY_VERSION}
360+ ```
361+ https://${VAULT_URL}/keys/${KEY_NAME}/${KEY_VERSION}
362+ ```
362363
363364To create a Key Vault and assign your service principal permissions on
364365it from the commandline:
@@ -381,11 +382,15 @@ https://sops.vault.azure.net/keys/sops-key/some-string
381382
382383Now you can encrypt a file using:
383384
384- $ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/some-string test.yaml > test.enc.yaml
385+ ``` sh
386+ $ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/some-string test.yaml > test.enc.yaml
387+ ```
385388
386389And decrypt it using:
387390
388- $ sops decrypt test.enc.yaml
391+ ``` sh
392+ $ sops decrypt test.enc.yaml
393+ ```
389394
390395## Encrypting and decrypting from other programs
391396
@@ -661,8 +666,10 @@ example policy is shown below.
661666You can specify a role in the ` --kms` flag and ` SOPS_KMS_ARN` variable
662667by appending it to the ARN of the master key, separated by a ** +** sign:
663668
664- < KMS ARN> +< ROLE ARN>
665- arn:aws:kms:us-west-2:927034868273:key/fe86dd69-4132-404c-ab86-4269956b4500+arn:aws:iam::927034868273:role/sops-dev-xyz
669+ ` ` `
670+ < KMS ARN> +< ROLE ARN>
671+ arn:aws:kms:us-west-2:927034868273:key/fe86dd69-4132-404c-ab86-4269956b4500+arn:aws:iam::927034868273:role/sops-dev-xyz
672+ ` ` `
666673
667674# # AWS KMS Encryption Context
668675
@@ -1326,14 +1333,8 @@ stores:
13261333 indent: 2
13271334` ` `
13281335
1329- :::: note
1330- ::: title
1331- Note
1332- :::
1333-
1334- The YAML emitter used by sops only supports values between 2 and 9. If
1336+ Note: The YAML emitter used by sops only supports values between 2 and 9. If
13351337you specify 1, or 10 and larger, the indent will be 2.
1336- ::::
13371338
13381339# # YAML anchors
13391340
0 commit comments