Skip to content

Commit

Permalink
Adds Import Key Pair Docs (#54)
Browse files Browse the repository at this point in the history
- adds import key pair docs
- amends position of sign and verify pages so that import key pair and
  generate key pair are next to each other in menu bar

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
  • Loading branch information
ChrisJBurns authored Jan 2, 2023
1 parent ce6f7c2 commit 0b2f28f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions content/en/cosign/import-keypair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "Importing Key Pairs"
category: "Cosign"
position: 104
---

> Currently only supports RSA and ECDSA private keys
### Import a Key Pair

The importing of a key pair with `cosign` is as follows.

```shell
$ cosign import-key-pair --key opensslrsakey.pem
Enter password for private key:
Enter password for private key again:
Private key written to import-cosign.key
Public key written to import-cosign.pub
```

### Sign a container with imported keypair

The use of the imported key pair to sign an artifact with `cosign` is as follows.

```shell
$ cosign sign --key import-cosign.key $IMAGE_DIGEST
Enter password for private key:
tlog entry created with index: *****
Pushing signature to: *****
```
2 changes: 1 addition & 1 deletion content/en/cosign/sign.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Signing"
category: "Cosign"
position: 104
position: 105
---

The general signing format with the `cosign sign` command is as follows.
Expand Down
2 changes: 1 addition & 1 deletion content/en/cosign/verify.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Verifying Claims"
category: "Cosign"
position: 105
position: 106
---

The general verification format with the `cosign verify` command is as follows.
Expand Down

0 comments on commit 0b2f28f

Please sign in to comment.