Minor edits to relocate text and introduction

Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
This commit is contained in:
Vladimir Diaz 2018-06-27 14:48:31 -04:00
parent 3d88d8bde1
commit 6bf8a95a71
No known key found for this signature in database
GPG key ID: 5DEE9B97B0E2289A

View file

@ -1,12 +1,13 @@
# CLI Usage Examples #
This document contains a few examples of creating repositories with the CLI.
The sections below correspond with a different example. Each section begins
with an outline of the steps to be followed by the user.
The sections below correspond with a different example, and each begins with an
outline of the steps to be followed by the user.
## A basic example ##
Steps:
(1) initialize a repo.
(2) delegate trust of target files to another role.
@ -71,6 +72,7 @@ The filename of the top-level keys must be "root_key," "targets_key,"
top-level key.
Steps:
(1) initialize a repo containing default keys for the top-level roles.
(2) distrust the default key for the root role.
(3) create a new key and trust its use with the root role.
@ -96,6 +98,7 @@ Enter a password for the encrypted key (tufkeystore/root_key):
## A more complicated example ##
Steps:
(1) create a bare repo.
(2) add keys to the top-level roles.
@ -117,8 +120,8 @@ fetch the Target's role README.txt.
(8) Add LICENSE to 'role_y' and demonstate that the client must not fetch it
because 'role_x' is a terminating delegation (and hasn't signed for it).
Steps (1) and (2)
```Bash
Steps (1) and (2)
$ repo.py --init --consistent --bare
$ repo.py --key ed25519 --filename root_key
$ repo.py --trust --pubkeys tufkeystore/root_key.pub --role root
@ -134,8 +137,8 @@ $ repo.py --sign tufkeystore/targets_key --role targets
Enter a password for the encrypted key (tufkeystore/targets_key):
```
Steps (3) and (4)
```Bash
Steps (3) and (4)
$ repo.py --key ed25519 --filename key_x
$ repo.py --key ed25519 --filename key_x2
@ -151,8 +154,8 @@ $ repo.py --delegate "README.*" "LICENSE" --delegatee role_y --role role_x
$ repo.py --sign tufkeystore/key_y --role role_y
```
Steps (5) and (6)
```Bash
Steps (5) and (6)
$ echo "role_x's readme" > README.txt
$ repo.py --add README.txt --role role_x --sign tufkeystore/key_x tufkeystore/key_x2
```
@ -170,9 +173,9 @@ $ cat tuftargets/README.txt
role_x's readme
```
Step (7)
```Bash
Step (7)
halt the server...
$ echo "Target role's readme" > README.txt
@ -188,8 +191,8 @@ $ cat tuftargets/README.txt
Target role's readme
```
Step (8)
```Bash
Step (8)
$ echo "role_y's license" > LICENSE
$ repo.py --add LICENSE --role role_y --sign tufkeystore/key_y
```