working commit
This commit is contained in:
@@ -17,9 +17,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"mstore/pkg/client"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"mstore/pkg/client"
|
||||
)
|
||||
|
||||
func packUserinfo(resurseuri, username, password string) (string, error) {
|
||||
@@ -53,6 +54,13 @@ func (util *ImageUtil) CreateImageCmds() *cobra.Command {
|
||||
subCmd.PersistentFlags().Uint64VarP(&util.commonImageParams.Timeout, "timeout", "t", defaultTimeout, "Operation timeout")
|
||||
subCmd.MarkFlagsRequiredTogether("user", "pass")
|
||||
|
||||
vi := viper.New()
|
||||
vi.SetEnvPrefix("mstore")
|
||||
vi.BindEnv("user")
|
||||
vi.BindEnv("pass")
|
||||
util.commonImageParams.Username = vi.GetString("user")
|
||||
util.commonImageParams.Password = vi.GetString("pass")
|
||||
|
||||
// PushImage
|
||||
var pushImageCmd = &cobra.Command{
|
||||
Use: "push filename [user:pass@]hostname[:port]/path:tag",
|
||||
|
||||
Reference in New Issue
Block a user