working commit

This commit is contained in:
2026-02-20 13:05:57 +02:00
parent 903a03cf89
commit dcb22b58d9
4 changed files with 37 additions and 5 deletions
+10 -2
View File
@@ -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",