From 6c552023a435070bd86523ff530f2c5a13fc606b Mon Sep 17 00:00:00 2001 From: Binbin Li Date: Wed, 10 Aug 2022 04:51:03 +0000 Subject: [PATCH 1/3] doc: add missing username/password options to commands Signed-off-by: Binbin Li --- specs/notation-cli.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/specs/notation-cli.md b/specs/notation-cli.md index 502e052e1..9e325c4a9 100644 --- a/specs/notation-cli.md +++ b/specs/notation-cli.md @@ -67,7 +67,12 @@ COMMANDS: help, h Shows a list of commands or help for one command OPTIONS: + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --help, -h show help (default: false) + +GLOBAL ARGUMENTS + --plain-http Registry access via plain HTTP (default: false) ``` ## certificate @@ -123,7 +128,12 @@ USAGE: notation list [command options] OPTIONS: + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --help, -h show help (default: false) + +GLOBAL ARGUMENTS + --plain-http Registry access via plain HTTP (default: false) ``` ## login @@ -185,9 +195,14 @@ USAGE: notation pull [command options] OPTIONS: + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --strict Pull the signature without lookup the manifest (default: false) --output value, -o value Write signature to a specific path --help, -h Show help (default: false) + +GLOBAL ARGUMENTS + --plain-http Registry access via plain HTTP (default: false) ``` ## push @@ -201,8 +216,13 @@ USAGE: notation push [command options] OPTIONS: + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --signature value, -s value, -f value signature files (accepts multiple inputs) --help, -h show help (default: false) + +GLOBAL ARGUMENTS + --plain-http Registry access via plain HTTP (default: false) ``` ## sign @@ -227,7 +247,12 @@ OPTIONS: --push push after successful signing (default: true) --push-reference value different remote to store signature --media-type value specify the media type of the manifest read from file or stdin (default: "application/vnd.docker.distribution.manifest.v2+json") + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --help, -h show help (default: false) + +GLOBAL ARGUMENTS + --plain-http Registry access via plain HTTP (default: false) ``` ## verify @@ -247,5 +272,10 @@ OPTIONS: --pull pull remote signatures before verification (default: true) --local, -l reference is a local file (default: false) --media-type value specify the media type of the manifest read from file or stdin (default: "application/vnd.docker.distribution.manifest.v2+json") + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --help, -h show help (default: false) + +GLOBAL ARGUMENTS + --plain-http Registry access via plain HTTP (default: false) ``` From 721cd9533bb4be9fb5df3edfa0faa45e5aa4a3a3 Mon Sep 17 00:00:00 2001 From: Binbin Li Date: Wed, 17 Aug 2022 02:14:25 +0000 Subject: [PATCH 2/3] doc: add description Signed-off-by: Binbin Li --- specs/notation-cli.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/notation-cli.md b/specs/notation-cli.md index 9e325c4a9..2e7edff6a 100644 --- a/specs/notation-cli.md +++ b/specs/notation-cli.md @@ -141,7 +141,7 @@ GLOBAL ARGUMENTS ```console notation login --help NAME: - notation login - Provides credentials for authenticated registry operations + notation login - Provides credentials for authenticated registry operations. USAGE: notation login [options] [server] @@ -164,6 +164,9 @@ notation login -u -p registry.example.com # Login using $NOTATION_USERNAME $NOTATION_PASSWORD variables notation login registry.example.com + +NOTES +Once login is completed, then -u -p is no longer required for any notation commands against the registry server authenticated. ``` ## plugin From 262cc16b78a83b02732de5b5d10edced5d5c00de Mon Sep 17 00:00:00 2001 From: Binbin Li Date: Wed, 17 Aug 2022 02:22:38 +0000 Subject: [PATCH 3/3] refactor: fix indentation Signed-off-by: Binbin Li --- specs/notation-cli.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/specs/notation-cli.md b/specs/notation-cli.md index 2e7edff6a..c2ef3ea7e 100644 --- a/specs/notation-cli.md +++ b/specs/notation-cli.md @@ -69,7 +69,7 @@ COMMANDS: OPTIONS: --username value, -u value Username for registry operations [$NOTATION_USERNAME] --password value, -p value Password for registry operations [$NOTATION_PASSWORD] - --help, -h show help (default: false) + --help, -h show help (default: false) GLOBAL ARGUMENTS --plain-http Registry access via plain HTTP (default: false) @@ -130,7 +130,7 @@ USAGE: OPTIONS: --username value, -u value Username for registry operations [$NOTATION_USERNAME] --password value, -p value Password for registry operations [$NOTATION_PASSWORD] - --help, -h show help (default: false) + --help, -h show help (default: false) GLOBAL ARGUMENTS --plain-http Registry access via plain HTTP (default: false) @@ -141,7 +141,7 @@ GLOBAL ARGUMENTS ```console notation login --help NAME: - notation login - Provides credentials for authenticated registry operations. + notation login - Provides credentials for authenticated registry operations USAGE: notation login [options] [server] @@ -198,14 +198,14 @@ USAGE: notation pull [command options] OPTIONS: - --username value, -u value Username for registry operations [$NOTATION_USERNAME] - --password value, -p value Password for registry operations [$NOTATION_PASSWORD] + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --strict Pull the signature without lookup the manifest (default: false) --output value, -o value Write signature to a specific path --help, -h Show help (default: false) GLOBAL ARGUMENTS - --plain-http Registry access via plain HTTP (default: false) + --plain-http Registry access via plain HTTP (default: false) ``` ## push @@ -219,13 +219,13 @@ USAGE: notation push [command options] OPTIONS: - --username value, -u value Username for registry operations [$NOTATION_USERNAME] - --password value, -p value Password for registry operations [$NOTATION_PASSWORD] + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --signature value, -s value, -f value signature files (accepts multiple inputs) --help, -h show help (default: false) GLOBAL ARGUMENTS - --plain-http Registry access via plain HTTP (default: false) + --plain-http Registry access via plain HTTP (default: false) ``` ## sign @@ -250,12 +250,12 @@ OPTIONS: --push push after successful signing (default: true) --push-reference value different remote to store signature --media-type value specify the media type of the manifest read from file or stdin (default: "application/vnd.docker.distribution.manifest.v2+json") - --username value, -u value Username for registry operations [$NOTATION_USERNAME] - --password value, -p value Password for registry operations [$NOTATION_PASSWORD] + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --help, -h show help (default: false) GLOBAL ARGUMENTS - --plain-http Registry access via plain HTTP (default: false) + --plain-http Registry access via plain HTTP (default: false) ``` ## verify @@ -275,10 +275,10 @@ OPTIONS: --pull pull remote signatures before verification (default: true) --local, -l reference is a local file (default: false) --media-type value specify the media type of the manifest read from file or stdin (default: "application/vnd.docker.distribution.manifest.v2+json") - --username value, -u value Username for registry operations [$NOTATION_USERNAME] - --password value, -p value Password for registry operations [$NOTATION_PASSWORD] + --username value, -u value Username for registry operations [$NOTATION_USERNAME] + --password value, -p value Password for registry operations [$NOTATION_PASSWORD] --help, -h show help (default: false) GLOBAL ARGUMENTS - --plain-http Registry access via plain HTTP (default: false) + --plain-http Registry access via plain HTTP (default: false) ```