Skip to content

Commit

Permalink
Include the required --payload option to (cosign attach signature)
Browse files Browse the repository at this point in the history
Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Mar 10, 2023
1 parent 1db2c83 commit c41cc56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/en/cosign/sign.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,21 @@ The signature is passed via the `--signature` flag.
It can be a file:

```shell
$ cosign attach signature --signature file.sig user/demo
$ cosign attach signature --signature file.sig --payload payload.json user/demo
Pushing signature to: user/demo:sha256-87ef60f558bad79beea6425a3b28989f01dd417164150ab3baab98dcbf04def8.sig
```

The base64-encoded signature:

```shell
$ cosign attach signature --signature Qr883oPOj0dj82PZ0d9mQ2lrdM0lbyLSXUkjt6ejrxtHxwe7bU6Gr27Sysgk1jagf1htO/gvkkg71oJiwWryCQ== user/demo
$ cosign attach signature --signature Qr883oPOj0dj82PZ0d9mQ2lrdM0lbyLSXUkjt6ejrxtHxwe7bU6Gr27Sysgk1jagf1htO/gvkkg71oJiwWryCQ== --payload payload.json user/demo
Pushing signature to: user/demo:sha256-87ef60f558bad79beea6425a3b28989f01dd417164150ab3baab98dcbf04def.sig
```

Or, `-` for `stdin` for chaining from other commands:

```shell
$ cosign generate user/demo | openssl... | cosign attach signature --signature -- user/demo
$ | openssl... | cosign attach signature --signature - --payload … user/demo
Pushing signature to: user/demo:sha256-87ef60f558bad79beea6425a3b28989f01dd417164150ab3baab98dcbf04def.sig
```

Expand Down

0 comments on commit c41cc56

Please sign in to comment.