Skip to content

Commit

Permalink
Merge pull request #1431 from rhatdan/tls-verify
Browse files Browse the repository at this point in the history
Remove the extra (defaults to true) help msg
  • Loading branch information
rhatdan committed Sep 25, 2021
2 parents 25d3e7b + 9edeb69 commit 2c2e5b7
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions cmd/skopeo/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type optionalBoolValue optionalBool
func optionalBoolFlag(fs *pflag.FlagSet, p *optionalBool, name, usage string) *pflag.Flag {
flag := fs.VarPF(internalNewOptionalBoolValue(p), name, "", usage)
flag.NoOptDefVal = "true"
flag.DefValue = "false"
return flag
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/skopeo/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (opts *deprecatedTLSVerifyOption) warnIfUsed(alternatives []string) {
func deprecatedTLSVerifyFlags() (pflag.FlagSet, *deprecatedTLSVerifyOption) {
opts := deprecatedTLSVerifyOption{}
fs := pflag.FlagSet{}
flag := optionalBoolFlag(&fs, &opts.tlsVerify, "tls-verify", "require HTTPS and verify certificates when accessing the container registry (defaults to true)")
flag := optionalBoolFlag(&fs, &opts.tlsVerify, "tls-verify", "require HTTPS and verify certificates when accessing the container registry")
flag.Hidden = true
return fs, &opts
}
Expand Down Expand Up @@ -130,7 +130,7 @@ func dockerImageFlags(global *globalOptions, shared *sharedImageOptions, depreca
}
fs.Var(newOptionalStringValue(&flags.registryToken), flagPrefix+"registry-token", "Provide a Bearer token for accessing the registry")
fs.StringVar(&flags.dockerCertPath, flagPrefix+"cert-dir", "", "use certificates at `PATH` (*.crt, *.cert, *.key) to connect to the registry or daemon")
optionalBoolFlag(&fs, &flags.tlsVerify, flagPrefix+"tls-verify", "require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)")
optionalBoolFlag(&fs, &flags.tlsVerify, flagPrefix+"tls-verify", "require HTTPS and verify certificates when talking to the container registry or daemon")
fs.BoolVar(&flags.noCreds, flagPrefix+"no-creds", false, "Access the registry anonymously")
return fs, &flags
}
Expand Down
4 changes: 2 additions & 2 deletions docs/skopeo-copy.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Access the registry anonymously.

**--src-tls-verify** _bool-value_

Require HTTPS and verify certificates when talking to container source registry or daemon (defaults to true).
Require HTTPS and verify certificates when talking to container source registry or daemon. Default to source registry setting.

**--dest-cert-dir** _path_

Expand All @@ -132,7 +132,7 @@ Access the registry anonymously.

**--dest-tls-verify** _bool-value_

Require HTTPS and verify certificates when talking to container destination registry or daemon (defaults to true).
Require HTTPS and verify certificates when talking to container destination registry or daemon. Default to destination registry setting.

**--src-daemon-host** _host_

Expand Down
2 changes: 1 addition & 1 deletion docs/skopeo-delete.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Directory to use to share blobs across OCI repositories.

**--tls-verify**=_bool_

Require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)
Require HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.

## EXAMPLES

Expand Down
2 changes: 1 addition & 1 deletion docs/skopeo-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Directory to use to share blobs across OCI repositories.

**--tls-verify**=_bool_

Require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)
Require HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.

## EXAMPLES

Expand Down
2 changes: 1 addition & 1 deletion docs/skopeo-list-tags.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The number of times to retry. Retry wait time will be exponentially increased ba

**--tls-verify**=_bool_

Require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)
Require HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.

## REPOSITORY NAMES

Expand Down
2 changes: 1 addition & 1 deletion docs/skopeo-login.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Print usage statement

**--tls-verify**=_bool_

Require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)
Require HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.

**--verbose**, **-v**

Expand Down
2 changes: 1 addition & 1 deletion docs/skopeo-logout.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Print usage statement

**--tls-verify**=_bool_

Require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)
Require HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions docs/skopeo-sync.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ Print usage statement.

**--src-no-creds** _bool-value_ Access the registry anonymously.

**--src-tls-verify** _bool-value_ Require HTTPS and verify certificates when talking to a container source registry or daemon (defaults to true).
**--src-tls-verify** _bool-value_ Require HTTPS and verify certificates when talking to a container source registry or daemon. Default to source registry entry in registry.conf setting.

**--dest-cert-dir** _path_ Use certificates (*.crt, *.cert, *.key) at _path_ to connect to the destination registry or daemon.

**--dest-no-creds** _bool-value_ Access the registry anonymously.

**--dest-tls-verify** _bool-value_ Require HTTPS and verify certificates when talking to a container destination registry or daemon (defaults to true).
**--dest-tls-verify** _bool-value_ Require HTTPS and verify certificates when talking to a container destination registry or daemon. Default to destination registry entry in registry.conf setting.

**--src-registry-token** _Bearer token_ for accessing the source registry.

Expand Down

0 comments on commit 2c2e5b7

Please sign in to comment.