Skip to content

Commit 7672a17

Browse files
committedJun 19, 2024··
Add username/password to push subcommand
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
1 parent 76c0f29 commit 7672a17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎cmd/helm/push.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ type registryPushOptions struct {
4040
caFile string
4141
insecureSkipTLSverify bool
4242
plainHTTP bool
43+
password string
44+
username string
4345
}
4446

4547
func newPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
@@ -69,7 +71,7 @@ func newPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
6971
},
7072
RunE: func(_ *cobra.Command, args []string) error {
7173
registryClient, err := newRegistryClient(
72-
o.certFile, o.keyFile, o.caFile, o.insecureSkipTLSverify, o.plainHTTP, "", "",
74+
o.certFile, o.keyFile, o.caFile, o.insecureSkipTLSverify, o.plainHTTP, o.username, o.password,
7375
)
7476

7577
if err != nil {
@@ -99,6 +101,8 @@ func newPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
99101
f.StringVar(&o.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
100102
f.BoolVar(&o.insecureSkipTLSverify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart upload")
101103
f.BoolVar(&o.plainHTTP, "plain-http", false, "use insecure HTTP connections for the chart upload")
104+
f.StringVar(&o.username, "username", "", "chart repository username where to locate the requested chart")
105+
f.StringVar(&o.password, "password", "", "chart repository password where to locate the requested chart")
102106

103107
return cmd
104108
}

0 commit comments

Comments
 (0)
Please sign in to comment.