mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
61 lines
1.2 KiB
Markdown
61 lines
1.2 KiB
Markdown
# CLI examples #
|
|
|
|
Note: This is a work in progress and subject to change. Only examples are
|
|
given here, for now.
|
|
|
|
## Create a repository ##
|
|
|
|
Create a TUF repository in the current working directory. A cryptographic key
|
|
is created and set for each top-level role. The Targets role does not sign for
|
|
any targets nor does it delegate trust to any roles.
|
|
|
|
```Bash
|
|
$ repo.py --init
|
|
```
|
|
|
|
|
|
|
|
Create a TUF repository at `./repo`.
|
|
```Bash
|
|
$ repo.py --init repo/
|
|
```
|
|
|
|
|
|
|
|
By default, `pw` is used to encrypt the top-level key files. Instead, the user
|
|
can be prompted for a password.
|
|
```Bash
|
|
$ repo.py --init --pw
|
|
```
|
|
|
|
|
|
Create a TUF repository in the current working directory. A cryptographic key
|
|
is *not* created nor set for each top-level role.
|
|
```Bash
|
|
$ repo.py --init --bare
|
|
```
|
|
|
|
|
|
|
|
Create a TUF repository with [consistent
|
|
snapshots](https://github.com/theupdateframework/specification/blob/master/tuf-spec.md#7-consistent-snapshots)
|
|
enabled. If enabled, all target filenames have their hash prepended.
|
|
```Bash
|
|
$ repo.py --init --consistent_snapshots
|
|
```
|
|
|
|
|
|
|
|
|
|
## Add a target file ##
|
|
```Bash
|
|
$ repo.py --add <foo.tar.gz>
|
|
```
|
|
|
|
|
|
|
|
|
|
## Remove the files created via `repo.py --init`.
|
|
```Bash
|
|
$ repo.py --clean
|
|
```
|