Browse Source

fixed node pwd issue

worker-9 4 years ago
parent
commit
eaa493f3d4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      netclient/functions/join.go
  2. 1 1
      netclient/main.go

+ 1 - 1
netclient/functions/join.go

@@ -103,8 +103,8 @@ func JoinNetwork(cfg config.ClientConfig, privateKey string) error {
 	}
 	}
 	if cfg.Node.Password == "" {
 	if cfg.Node.Password == "" {
 		cfg.Node.Password = GenPass()
 		cfg.Node.Password = GenPass()
-		auth.StoreSecret(cfg.Node.Password, cfg.Node.Network)
 	}
 	}
+	auth.StoreSecret(cfg.Node.Password, cfg.Node.Network)
 	if cfg.Node.Endpoint == "" {
 	if cfg.Node.Endpoint == "" {
 		if cfg.Node.IsLocal == "yes" && cfg.Node.LocalAddress != "" {
 		if cfg.Node.IsLocal == "yes" && cfg.Node.LocalAddress != "" {
 			cfg.Node.Endpoint = cfg.Node.LocalAddress
 			cfg.Node.Endpoint = cfg.Node.LocalAddress

+ 1 - 1
netclient/main.go

@@ -31,7 +31,7 @@ func main() {
 			Name:    "password",
 			Name:    "password",
 			Aliases: []string{"p"},
 			Aliases: []string{"p"},
 			EnvVars: []string{"NETCLIENT_PASSWORD"},
 			EnvVars: []string{"NETCLIENT_PASSWORD"},
-			Value:   "badpassword",
+			Value:   "",
 			Usage:   "Password for authenticating with netmaker.",
 			Usage:   "Password for authenticating with netmaker.",
 		},
 		},
 		&cli.StringFlag{
 		&cli.StringFlag{