If applied, this commit will introduce a new `--insecure-repository`
flag to the following commands: `push artifacts`, `pull artifact`,
`diff artifact` and `list artifacts`. When used the flag will lead to
the option `crane.Insecure` being passed to the `crane` client allowing
the use of insecure repositories.
Signed-off-by: Matthieu Mottet <m.mottet@outlook.com>
pull/5299/head
Matthieu Mottet4 days agocommitted byMatthieu Mottet
diffArtifactCmd.Flags().StringVar(&diffArtifactArgs.creds,"creds","","credentials for OCI registry in the format <username>[:<password>] if --provider is generic")
listArtifactsCmd.Flags().StringVar(&listArtifactArgs.regexFilter,"filter-regex","","filter tags returned from the oci repository using regex")
listArtifactsCmd.Flags().StringVar(&listArtifactArgs.creds,"creds","","credentials for OCI registry in the format <username>[:<password>] if --provider is generic")
@ -43,6 +44,7 @@ The command can read the credentials from '~/.docker/config.json' but they can a
typepullArtifactFlagsstruct{
outputstring
credsstring
insecurebool
providerflags.SourceOCIProvider
}
@ -58,6 +60,7 @@ func init() {
pullArtifactCmd.Flags().StringVarP(&pullArtifactArgs.output,"output","o","","path where the artifact content should be extracted.")
pullArtifactCmd.Flags().StringVar(&pullArtifactArgs.creds,"creds","","credentials for OCI registry in the format <username>[:<password>] if --provider is generic")
@ -115,6 +115,7 @@ type pushArtifactFlags struct {
outputstring
debugbool
reproduciblebool
insecurebool
}
varpushArtifactArgs=newPushArtifactFlags()
@ -137,6 +138,7 @@ func init() {
"the format in which the artifact digest should be printed, can be 'json' or 'yaml'")
pushArtifactCmd.Flags().BoolVarP(&pushArtifactArgs.debug,"debug","",false,"display logs from underlying library")
pushArtifactCmd.Flags().BoolVar(&pushArtifactArgs.reproducible,"reproducible",false,"ensure reproducible image digests by setting the created timestamp to '1970-01-01T00:00:00Z'")
pushArtifactCmd.Flags().BoolVar(&pushArtifactArgs.insecure,"insecure-registry",false,"allows artifacts to be pushed without TLS")